File tree 1 file changed +3
-3
lines changed
packages/vite/src/node/plugins
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) {
1411
1411
const { code, warnings } = await transform ( css , {
1412
1412
loader : 'css' ,
1413
1413
target : config . build . cssTarget || undefined ,
1414
- charset : 'utf8' ,
1415
- ...resolveEsbuildMinifyOptions ( config . esbuild || { } ) ,
1414
+ ...resolveMinifyCssEsbuildOptions ( config . esbuild || { } ) ,
1416
1415
} )
1417
1416
if ( warnings . length ) {
1418
1417
const msgs = await formatMessages ( warnings , { kind : 'warning' } )
@@ -1432,10 +1431,11 @@ async function minifyCSS(css: string, config: ResolvedConfig) {
1432
1431
}
1433
1432
}
1434
1433
1435
- function resolveEsbuildMinifyOptions (
1434
+ function resolveMinifyCssEsbuildOptions (
1436
1435
options : ESBuildOptions ,
1437
1436
) : TransformOptions {
1438
1437
const base : TransformOptions = {
1438
+ charset : options . charset ?? 'utf8' ,
1439
1439
logLevel : options . logLevel ,
1440
1440
logLimit : options . logLimit ,
1441
1441
logOverride : options . logOverride ,
You can’t perform that action at this time.
0 commit comments