diff --git a/.changeset/wide-configs-extend.md b/.changeset/wide-configs-extend.md new file mode 100644 index 0000000..1fb2f4d --- /dev/null +++ b/.changeset/wide-configs-extend.md @@ -0,0 +1,5 @@ +--- +"@plexus-ms/config": minor +--- + +Add the `tsconfig-next` subpath export: the shared TypeScript compiler options for Next.js apps — `"extends": "@plexus-ms/config/tsconfig-next"`. `include`/`exclude` and `paths` stay in the extending app, since TypeScript resolves them relative to the file that declares them. diff --git a/packages/config/package.json b/packages/config/package.json index 1512059..5524461 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -4,10 +4,12 @@ "description": "Shared tool configurations for Plexus repos — each an extend-in-one-line subpath export (§ 9 PLX).", "license": "GPL-3.0-or-later", "files": [ - "biome.json" + "biome.json", + "tsconfig-next.json" ], "exports": { - "./biome": "./biome.json" + "./biome": "./biome.json", + "./tsconfig-next": "./tsconfig-next.json" }, "repository": { "type": "git", diff --git a/packages/config/tsconfig-next.json b/packages/config/tsconfig-next.json new file mode 100644 index 0000000..ac9997b --- /dev/null +++ b/packages/config/tsconfig-next.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "target": "ES2017", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "react-jsx", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ] + } +}