Closed hzhang1902 closed 2 years ago
I am using tsconfig path to import a file outside of project root, like:
"paths": { "shared/*": [ "../shared/*" ], }
this is working on other webpack/esbuild projects, but not with this plugin. I used debug mode and logged the following error:
vite-tsconfig-paths crawling "/Users/admin/.../my-project" +0ms vite-tsconfig-paths options: { projects: [ '/Users/admin/.../my-project/tsconfig.json' ], extensions: [ '.ts', '.tsx', '.js', '.jsx', '.mjs' ] } +4ms vite-tsconfig-paths [!] missing baseUrl: "/Users/admin/.../my-project/tsconfig.json" +4ms
and vite throws the error as if the plugin is not used
Error: The following dependencies are imported but could not be resolved:
The docs for TypeScript say that baseUrl is required if paths is used. https://www.typescriptlang.org/tsconfig/#paths
baseUrl
paths
Fixed in v3.4.0
I am using tsconfig path to import a file outside of project root, like:
this is working on other webpack/esbuild projects, but not with this plugin. I used debug mode and logged the following error:
and vite throws the error as if the plugin is not used