-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Dynamic (@vite-ignore'd) import with //
breaks JS transform
#5051
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Comments
Ah, thanks, thought I was going mad. |
4 tasks
haoqunjiang
added
p3-minor-bug
An edge case that only affects very specific usage (priority)
and removed
pending triage
labels
Oct 10, 2021
Still reproducible with Vite 2.9.0-beta.4, but it's not crashing the server now. Instead it gives a false warning that the
|
4 tasks
Start a new pull request in StackBlitz Codeflow. |
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
Importing a dynamic URL with '//' in it will break the output JS:
This is cause by regex replacement here:
vite/packages/vite/src/node/plugins/importAnalysis.ts
Line 617 in 7d20580
Reproduction
Minimal reproduction is here:
https://stackblitz.com/edit/vite-pgxelk?file=main.js
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: