vite
vite copied to clipboard
Page reload not working for ?raw CSS imports
Describe the bug
The title says it really; page reload appears to have stopped working in Vite 5 for ?raw
CSS (and possibly other) imports. I checked back and it is working in the latest v4 but looks to have stopped in v5. I've created a couple of projects on StackBlitz to show it working in v4 and not in v5 (remove commented out background-color
on body
and save).
We're using the imports to pull related CSS into (Lit) web components, which we've done purely to keep the JS/CSS separate and make things easier to work with. Any help will be much appreciated, as is all your hard work to date. Many thanks!
Reproduction
https://stackblitz.com/edit/vitejs-vite-qfytfv?file=style.css
Steps to reproduce
No response
System Info
System:
OS: Windows 10 10.0.19045
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 21.73 GB / 31.69 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (123.0.2420.65)
Internet Explorer: 11.0.19041.3636
npmPackages:
@vitejs/plugin-vue: ^5.0.4 => 5.0.4
vite: ^5.2.6 => 5.2.6
Used Package Manager
npm
Logs
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] 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.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
Start a new pull request in StackBlitz Codeflow.