fix: switch to source-first internal package pattern

Remove composite mode and project references. Internal packages
(@zpan/shared) export .ts source files directly via package.json
exports field. Bundlers (Vite, wrangler, tsup) handle .ts at build
time, and tsc --noEmit resolves cross-package imports through the
exports field without needing a build step.

This eliminates TS6305 errors when typechecking server/web after
modifying shared, which was breaking every PR that imported from
@zpan/shared/types or @zpan/shared/schemas.
This commit is contained in:
saltbo
2026-04-07 20:08:01 -04:00
parent a1510906fb
commit 800c1f0232
3 changed files with 2 additions and 14 deletions
+1 -5
View File
@@ -1,12 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "dist",
"rootDir": "src",
"types": ["@cloudflare/workers-types"]
},
"include": ["src"],
"exclude": ["src/**/*.cf-test.ts", "src/test/apply-migrations.ts"],
"references": [{ "path": "../shared" }]
"exclude": ["src/**/*.cf-test.ts", "src/test/apply-migrations.ts"]
}
-5
View File
@@ -1,9 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"composite": true,
"outDir": "dist",
"rootDir": "src"
},
"include": ["src"]
}
+1 -4
View File
@@ -4,13 +4,10 @@
"declaration": false,
"declarationMap": false,
"jsx": "react-jsx",
"outDir": "dist",
"rootDir": "src",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src"],
"references": [{ "path": "../shared" }]
"include": ["src"]
}