We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for .ts to .js alias was added in vite upstream But it doesn't work with vite-tsconfig-paths:
// from vite.config.ts plugins: [ preact({ include: '{test/,}src/**/*.{ts,tsx}', }), !isTest && tsconfigPaths(), !isTest && checker({ typescript: { tsconfigPath: 'src/tsconfig.json' }, eslint: { lintCommand: 'eslint "./src/**/*.{ts,tsx}"', }, }), isTest && typescript(), ],
// from tsconfig.json "paths": { "@src/*": ["./src/*"], "@server/*": ["./server/*"], "@test/*": ["./test/*"] },
Currently I can fix it by:
resolve: { alias: [{ find: /^(@.*\/.*)\.js$/, replacement: '$1.ts' }] }
Repro can be found here: wight554/blog-template#50
See this issue for more details: vitejs/vite#7918
The text was updated successfully, but these errors were encountered:
This is a bug in tsconfig-paths
tsconfig-paths
See here: dividab/tsconfig-paths#213
Sorry, something went wrong.
~/lib/util.js
ESM
Are there any temporary solutions at the moment?
Alias, check issue description for example
3111cb1
No branches or pull requests
Support for .ts to .js alias was added in vite upstream
But it doesn't work with vite-tsconfig-paths:
Currently I can fix it by:
Repro can be found here:
wight554/blog-template#50
See this issue for more details:
vitejs/vite#7918
The text was updated successfully, but these errors were encountered: