mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-30 17:50:07 +08:00
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:
@@ -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"]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user