mirror of
https://github.com/hanzoai/finance.git
synced 2026-10-30 18:36:28 +00:00
Every entry — main, module, types and both exports conditions — named a .ts file, and `files` shipped src. That works only for a consumer with a bundler in front of it: a Next BFF route, an edge worker or a vitest suite loads the package as JavaScript and parses `(v: unknown): v is number => typeof …` as a syntax error, so the suite fails to collect and reports a broken dependency. Node refuses to strip types under node_modules at all. The console's finance transport test hit this on the root barrel, and `./data` — the seam that exists precisely so a transport module never pulls the component graph — was raw source too. tsc now emits ESM with declarations to dist and the manifest names it. Relative specifiers carry .js in source so the emit is fully specified and resolves without a bundler; src still ships, so the source maps point at something real. prepublishOnly builds rather than typechecks: the artifact a publish uploads is now built, and it should be built fresh. gui.d.ts moves under src as the sibling @hanzo/canvas keeps it, which lets the build config set rootDir to src alone. Co-authored-by: Hanzo Dev <[email protected]>
20 lines
484 B
JSON
20 lines
484 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2022",
|
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"jsx": "react-jsx",
|
|
"strict": true,
|
|
"noUncheckedIndexedAccess": false,
|
|
"isolatedModules": true,
|
|
"esModuleInterop": true,
|
|
"resolveJsonModule": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"noEmit": true
|
|
},
|
|
"include": ["src"],
|
|
"exclude": ["node_modules", "dist"]
|
|
}
|