Skip to content

Commit

Permalink
fix(css): cssCodeSplit in environments.xxx.build is invalid (#18464)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonny-china authored Oct 26, 2024
1 parent 89f8303 commit 993e71c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
pureCssChunks.add(chunk)
}

if (config.build.cssCodeSplit) {
if (this.environment.config.build.cssCodeSplit) {
if (opts.format === 'es' || opts.format === 'cjs') {
const isEntry = chunk.isEntry && isPureCssChunk
const cssFullAssetName = ensureFileExt(chunk.name, '.css')
Expand Down

0 comments on commit 993e71c

Please sign in to comment.