-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Regression in CSS output location #15141
Description
Describe the bug
CSS is output to a different location. That location doesn't match the location in the manifest and the change in location breaks SvelteKit users upgrading to Vite 5 because it breaks relative links to font files and potentially other assets: sveltejs/kit#11085
We could work around it on the SvelteKit side by changing the left hand side of the input object in the Vite config, but the workarounds have some issues. E.g. I could replace / with _, but then the file names get to be awkwardly long and show up differently in the Chrome network tab. If I try to just strip the portion before / then I run into the danger of overwriting the input entries for files with the same name living in different directories.
Reproduction
Steps to reproduce
pnpm install && pnpm build
Vite 5 produces CSS at dist/assets/lib/example-XpY97b8p.css
Vite 4 produces CSS at dist/assets/example-507eca81.css
System Info
Vite 5.0.2 compared to Vite 4.5.0Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.