We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d395e82 commit bcecf6dCopy full SHA for bcecf6d
packages/vite/src/node/plugins/css.ts
@@ -953,6 +953,16 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
953
return
954
}
955
956
+ // vite:asset cleans up earlier assets of 'renderChunk',
957
+ // but with cssCodeSplit=false we may still emit CSS here.
958
+ // So is our responsibility to respect emitAssets
959
+ if (
960
+ config.command === 'build' &&
961
+ !this.environment.config.build.emitAssets
962
+ ) {
963
+ return
964
+ }
965
+
966
// extract as single css bundle if no codesplit
967
if (!this.environment.config.build.cssCodeSplit && !hasEmitted) {
968
let extractedCss = ''
0 commit comments