vite
vite copied to clipboard
fix(css): also remove empty style chunk when `cssCodeSplit: false` (fixes #16582)
Description
- Resolves #16582
When setting cssCodeSplit: false
the styles are still split into one style file, but currently the imported CSS results in empty chunks as in the current implementation empty chunks are only removed when cssCodeSplit
was set to true
.
So this also adds empty style chunks to pureCSSChunks
even with cssCodeSplit: false
.
Run & review this pull request in StackBlitz Codeflow.
I guess this is a duplicate of #16078. Would you try if #16078 works for you?
@sapphi-red yes it does! And it provides tests :rocket:
Closing in favor of https://github.com/vitejs/vite/pull/16078