-
-
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
URL Query Parameter with .scss causes vite to fail #6894
Comments
@dongj0316 what's the aim of doing this? it looks like vite treats this url as a local file throught the middleware |
@JinJianQi This is a legal URL parameter value. We don't know what this value looks like. Legal values should be supported. In my usage scenario, I may need to receive a resource address through the URL parameter |
|
#5265 is a issue with path including |
Note: this might be a slightly different issue than the OP
The vite server (confirmed both 2.9 and 3.0) builds and serve the application, but fail to load the font. I searched alot before I figured out the url parameter was the culprit. I used the The browser fail with: Removing the query parameter from the css files resolved the issue. ( |
@olejorgenb I think that is a different issue. Would you create a new issue? |
I came across this with a .css file. When we added a new param to the end of the query it started working. For instance in your original post, the url would become https://vitejs-vite-yduu1r--3000.local.webcontainer.io?url=test.com%2Fa.scss&a=a |
Moving this out of Vite 5 milestone as it's not a breaking issue. But I have a fix locally and will sent a PR shortly. |
Describe the bug
When navigating to a URL with a query parameter that contains a .scss, the vite development server will fail
Reproduction
https://stackblitz.com/edit/vitejs-vite-yduu1r?file=package.json
Start the service and open
https://vitejs-vite-yduu1r--3000.local.webcontainer.io?url=test.com%2Fa.scss
System Info
Used Package Manager
yarn
Logs
Validations
The text was updated successfully, but these errors were encountered: