mirror of https://github.com/vuejs/vitepress
The root config had no include, so the editor program for any src file swallowed every file importing 'vitepress' (tests, docs configs) and with them dist/node/index.d.ts — whose bundled copies of the vite and default-theme augmentations collide with the source ones under different type identities (TS2717), alongside ~1200 phantom errors from test globals. The root project now covers only the sources and resolves 'vitepress' onto src the way tsconfig.client.json already does; every other config extends tsconfig.base.json directly (the root added nothing over it), leaving their programs byte-identical. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>pull/5406/head
parent
368b66ea94
commit
12b94474eb
@ -1,3 +1,24 @@
|
|||||||
|
// the editor's project for the sources. Self-contained: `vitepress` resolves
|
||||||
|
// onto src (same trick as tsconfig.client.json), so the built dist — whose
|
||||||
|
// bundled types re-declare the `vite` and default-theme augmentations under
|
||||||
|
// different type identities — never enters this program. Tests and docs have
|
||||||
|
// their own nearest tsconfigs and resolve the package normally.
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig.base.json"
|
"extends": "./tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"paths": {
|
||||||
|
"vitepress": ["./src/client/index.ts"],
|
||||||
|
"vitepress/theme": ["./types/default-theme.d.ts"],
|
||||||
|
"@siteData": ["./src/client/shims.d.ts"],
|
||||||
|
"@theme/index": ["./src/client/shims.d.ts"],
|
||||||
|
"@localSearchIndex": ["./src/client/shims.d.ts"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"src",
|
||||||
|
"types",
|
||||||
|
"scripts",
|
||||||
|
"shared-globals.d.ts",
|
||||||
|
"tsdown.config.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in new issue