You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In CSS, if an entry is imported more than once, the last @import should win over the previous ones.
Instead, Vite generates the CSS bundle preserving just the first import.
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.
I understand the problem of introducing a fix that leads to a breaking change. On the other hand, it should be very clear in Vite's documentation that this issue exists and that the CSS output is potentially very different from that of other tools like esbuild and lightningcss.
Describe the bug
In CSS, if an entry is imported more than once, the last
@import
should win over the previous ones.Instead, Vite generates the CSS bundle preserving just the first import.
For example:
should be equivalent to:
but Vite treats it like:
Reproduction
https://github.com/edoardocavazza/vite-css-bundle
Steps to reproduce
yarn
install to dependencies.yarn serve
to start http-serveryarn dev
to start viteSystem Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: