-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
File import containing % does not resolve correctly #15298
Comments
I'm unsure if the handling of |
Faux ESM treats the import specifier (I mean the For example, in order to import a file named I guess we first need to decide how Vite should handle this. |
What is faux ESM? Do you mean how it's treated by Vite during bundling? We can't change how native ESM handles it, so I imagine that if we wanted to fix this that our only choice would be to align with native ESM. |
It's a term that refers to files that cannot be run in the browser or Node.js, but use ESM import/export. It's consumed by a bundler including Vite, Webpack, parcel, etc. For example, a file is specified by If we align the behavior with native ESM, this error itself is not a bug. (We could add a more friendly error message though.) It seems |
Co-authored-by: bluwy <[email protected]>
Reopening as the fix by #15311 was not correct and #16244 reverted that part. To clarify, the error for the |
Note that TypeScript does not work well in these cases (microsoft/TypeScript#41730). |
Is this issue also related #9917? The issue description says |
Ah, yeah, it seems the root cause is same. |
Describe the bug
"Internal server error: URI malformed" when using a percent sign in URL
Reproduction
https://github.com/hichemfantar/vite-bug-repro
Steps to reproduce
System Info
Used Package Manager
npm
Logs
no build errors
Validations
The text was updated successfully, but these errors were encountered: