vite icon indicating copy to clipboard operation
vite copied to clipboard

fix(css): also remove empty style chunk when `cssCodeSplit: false` (fixes #16582)

Open susnux opened this issue 9 months ago • 2 comments

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.

susnux avatar May 03 '24 09:05 susnux

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

stackblitz[bot] avatar May 03 '24 09:05 stackblitz[bot]

I guess this is a duplicate of #16078. Would you try if #16078 works for you?

sapphi-red avatar May 04 '24 07:05 sapphi-red

@sapphi-red yes it does! And it provides tests :rocket:

susnux avatar May 14 '24 09:05 susnux

Closing in favor of https://github.com/vitejs/vite/pull/16078

susnux avatar May 14 '24 09:05 susnux