Repository navigation
Expand file tree
/
Copy pathtsconfig.json
More file actions
59 lines (58 loc) · 2.67 KB
/
Copy pathtsconfig.json
File metadata and controls
59 lines (58 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"jsx": "react-jsx",
"noEmit": false,
"declaration": true,
// The incremental build RECORD, pinned OUTSIDE the published build output.
// Left unpinned, TypeScript derives it from `outDir`/`rootDir`: a package with
// no `rootDir` gets `dist/tsconfig.tsbuildinfo` -- inside what `files: ["dist",
// ...]` publishes -- and `pnpm check:published-dist` then reds on a byte-identical
// tree as soon as anything runs `tsc` (objectui#9189). Pinned in every composite
// package so the location is a decision, not a side effect of an unrelated option.
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
"composite": true,
// Node's ESM resolver does NOT extension-search relative specifiers, so an
// extensionless `./SchemaRenderer` in the emitted dist is unloadable under
// plain Node (`ERR_MODULE_NOT_FOUND`) — objectui#4538. `tsc` never rewrites
// specifiers, so what the source writes is what dist ships; the only way to
// keep the extensions is to have the compiler REJECT a missing one.
//
// These two override the root's `"module": "ESNext"` /
// `"moduleResolution": "bundler"` for THIS package only (the root is shared
// by 38 packages — flipping it there is a different change). Under
// `nodenext` a missing extension is TS2835 and a bare directory import is
// TS2834, so the property is enforced at compile time rather than by
// review. Emit is unchanged: package.json is `"type": "module"`, so
// `nodenext` emits the same ESM `ESNext` did.
//
// Runtime loadability is pinned separately by `pnpm check:node-esm-load`
// (scripts/check-node-esm-load.mjs), which actually imports the built entry
// under plain Node — resolution alone would not have caught this.
"module": "nodenext",
"moduleResolution": "nodenext"
},
"include": ["src"],
// Tooling is excluded by DIRECTORY, not just by file NAME. A helper under
// `__tests__/` that is not itself called `*.test.ts` is otherwise a program
// input, and an EMITTING program writes it into the published `dist`
// (objectui#4006 / #4836 / #6943 -- the same defect three times, each found
// by hand). Enforced repo-wide by `pnpm check:published-tsconfig-exclude`
// (objectui#7212), which derives these directory names from `TOOLING_FILE`
// in scripts/check-phantom-dependencies.mjs.
"exclude": [
"node_modules",
"dist",
"**/__tests__/**",
"**/__mocks__/**",
"**/__benchmarks__/**",
"**/*.test.ts",
"**/*.test.tsx"
],
"references": [
{ "path": "../types" },
{ "path": "../core" }
]
}