Point the @ alias at a relative path, and drop baseUrl
TypeScript 7 removes `baseUrl` outright and refuses a non-relative entry in `paths`, so the typecheck stops on tsconfig.json before it reaches a line of our code. A leading `./` says the same thing without it: paths resolve against the tsconfig's own directory, which is what `baseUrl: "."` was there to arrange. Nothing here waits for the upgrade. Relative paths without a baseUrl have been the supported spelling since 4.4, so this typechecks the same under 5.9.3 today as it will under 7. Vite resolves `@` from its own alias in vite.config.ts and never read this. With this in, 7.0.2 typechecks both workspaces clean -- the two tsconfig errors were all that stood in the way, not the first two of many.
This commit is contained in:
+1
-2
@@ -16,8 +16,7 @@
|
|||||||
"allowImportingTsExtensions": true,
|
"allowImportingTsExtensions": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"types": ["vite/client"],
|
"types": ["vite/client"],
|
||||||
"baseUrl": ".",
|
"paths": { "@/*": ["./src/*"] }
|
||||||
"paths": { "@/*": ["src/*"] }
|
|
||||||
},
|
},
|
||||||
"include": ["src", "vite.config.ts"]
|
"include": ["src", "vite.config.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user