-
-
Notifications
You must be signed in to change notification settings - Fork 53
Vite fails to resolve files when vite-tsconfig-paths is used alongside vite-plugin-svgr, but only on Windows #143
New issue
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
Comments
Not sure if this is really an issue with |
I believe this has been fixed in #157. Let me know otherwise. |
Unfortunately, it's still not working on Windows - here's the project with dependencies updated to the latest versions (vite-tsconfig-paths is at 5.1.3) https://stackblitz.com/edit/vitejs-vite-rypg1h?file=src%2FTest%2FTest.tsx,src%2FApp.tsx,package.json&terminal=dev I'm getting the same error:
|
I'm having a similar problem. Our project uses vite-tsconfig-paths for a runtime import in a .spec file. It works on other people's Mac machines, and in the pipeline, but not on local Windows-based machines.
|
Hello! I've tried to be more thorough with path normalization in v6 ( If you still have issues, try setting |
Still getting the same error, unfortunately. Here's the log file from |
I've run into a very weird issue with vite-tsconfig-paths, my project suddenly stopped working without me changing anything in it.
After a few hours of debugging, I managed to narrow down the issue and reproduce it in a new Vite+React+TS project. The issue is caused by
vite-plugin-svgr
, but only on Windows 10 with the latest updates (I suspect it's KB5039211).The project works perfectly fine on StackBlitz - https://stackblitz.com/edit/vitejs-vite-vmbggc?file=src%2FTest%2FTest.tsx,src%2FApp.tsx,tsconfig.app.json,vite.config.ts&terminal=dev, it works on my outdated Win11 VM, but not on the latest Win10. The issue happens regardless of NodeJS version.
When
svgr(...)
is commented out in plugins, it starts working again.I don't know where to even start debugging this. Here's the output of
SET DEBUG=vite-tsconfig-paths && npm run dev
:The text was updated successfully, but these errors were encountered: