-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Asset extension matching not consistent between DEV and PREVIEW #4931
Comments
I can't reproduce this. It's working fine for me. Please provide a complete clonable repo that reproduces the issue. |
This sounds like a case sensitivity thing. I see you're on Windows and you're requesting the file with a lower case extension and it looks like the file is named with an upper case extension. |
We should probably enforce correct case at dev time |
Do we have the access/control necessary for that? Isn't Vite solely responsible for serving those assets, and we just give it the directory to use? |
No, we use kit/packages/kit/src/core/dev/plugin.js Lines 200 to 204 in ae416be
kit/packages/kit/src/core/dev/plugin.js Lines 176 to 181 in ae416be
I don't recall if |
* ensure correct case is used for static assets - closes #4931 * Update packages/kit/test/apps/basics/test/test.js Co-authored-by: Maurício Kishi <mrkishi@users.noreply.github.com> * Update packages/kit/src/core/dev/plugin.js Co-authored-by: Maurício Kishi <mrkishi@users.noreply.github.com> Co-authored-by: Maurício Kishi <mrkishi@users.noreply.github.com>
Describe the bug
Preview build of sveltekit doesn't match asset paths the same way as dev build.
Reproduction
Put let's say image.PNG inside of static then in index.svelte
<img src="/image.png" />
and let's run npm run dev, then run build and preview and the image won't be displayed anymore.Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: