-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Virtual modules ending in *.svg fail to load #19914
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
Probably it's happening because vite/packages/vite/src/node/server/transformRequest.ts Lines 256 to 260 in 3db608a
vite/packages/vite/src/node/server/middlewares/transform.ts Lines 252 to 254 in 3db608a
vite/packages/vite/src/node/server/middlewares/static.ts Lines 284 to 286 in 3db608a
I guess changing ensureServingAccess to return 3-values (instead of a boolean) and calling next on the caller side can solve this issue.
|
I think this also happens with the newer version of v5 as it's caused by the security patch. |
possible. My original version was on a fairly old v5 |
Just for the records (stumbled over this as well with our plugin) Security report: GHSA-xcj6-pq6g-qj4x |
Describe the bug
I am using a vite plugin to add a virtual module. Just by chance, since its generating an svg, I ended its name in
*.svg
. This worked fine in vite v5 but fails after upgrading to vite v6. The server seems to resolve the svg differently and cant find in.Renaming the ending immediately solves this problem.
Reproduction
https://stackblitz.com/edit/vitejs-vite-ecxwyqxf?file=src%2Fmain.js
Steps to reproduce
*.svg
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: