File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1411,8 +1411,7 @@ async function minifyCSS(css: string, config: ResolvedConfig) {
14111411 const { code, warnings } = await transform ( css , {
14121412 loader : 'css' ,
14131413 target : config . build . cssTarget || undefined ,
1414- charset : 'utf8' ,
1415- ...resolveEsbuildMinifyOptions ( config . esbuild || { } ) ,
1414+ ...resolveMinifyCssEsbuildOptions ( config . esbuild || { } ) ,
14161415 } )
14171416 if ( warnings . length ) {
14181417 const msgs = await formatMessages ( warnings , { kind : 'warning' } )
@@ -1432,10 +1431,11 @@ async function minifyCSS(css: string, config: ResolvedConfig) {
14321431 }
14331432}
14341433
1435- function resolveEsbuildMinifyOptions (
1434+ function resolveMinifyCssEsbuildOptions (
14361435 options : ESBuildOptions ,
14371436) : TransformOptions {
14381437 const base : TransformOptions = {
1438+ charset : options . charset ?? 'utf8' ,
14391439 logLevel : options . logLevel ,
14401440 logLimit : options . logLimit ,
14411441 logOverride : options . logOverride ,
You can’t perform that action at this time.
0 commit comments