-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
vite.moduleGraph.safeModulesPath
contents are... weird
#3349
Comments
FWIW, I can't reproduce this. I'm getting an empty array/set. Ubuntu on WSL. |
It repros for me -- the list is as described in the issue report. Also Ubuntu on WSL. |
Same, arch linux |
Reproducible with macos M1 Pro. But I have to visit http://localhost:3000 first, then http://localhost:3000/safe-modules-inspector, for it to show the paths. Loading the subpath URL directly after dev server startup shows an empty list. A quick search in Vite shows this line to be truncating it. |
unconditionally stripping the first 4 chars seems weird. |
@bluwy this is the same for me actually, didn't realise |
may be fixed by vitejs/vite#6518 |
Thanks @dominikg! Not sure if you saw, but it looks like there's a test failure on that PR that will need to be looked at |
yeah i just rebased the PR and it fails in the same way so seems valid. Unfortunately it's windows and my windows vm is toast. |
vitejs/vite#6518 was just merged and will be included in Vite 2.9 |
Describe the bug
This is a bit of an odd one — it's not causing any problems per se, and the fault probably lies with Vite, but I haven't succeeded in reproducing it in Vite without Kit, so I'm raising it here instead.
Vite's
moduleGraph
has asafeModulesPath
set of paths that (I think) have been determined to be safe to serve. But the paths are truncated. When I log them out, a typical list looks like this:Reproduction
https://github.com/Rich-Harris/vite-safe-modules-repro
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: