File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2695,6 +2695,7 @@ function isPreProcessor(lang: any): lang is PreprocessLang {
2695
2695
2696
2696
const importLightningCSS = createCachedImport ( ( ) => import ( 'lightningcss' ) )
2697
2697
2698
+ const decoder = new TextDecoder ( )
2698
2699
async function compileLightningCSS (
2699
2700
id : string ,
2700
2701
src : string ,
@@ -2760,7 +2761,10 @@ async function compileLightningCSS(
2760
2761
: undefined ,
2761
2762
} )
2762
2763
2763
- let css = res . code . toString ( )
2764
+ // NodeJS res.code = Buffer
2765
+ // Deno res.code = Uint8Array
2766
+ // For correct decode compiled css need to use TextDecoder
2767
+ let css = decoder . decode ( res . code )
2764
2768
for ( const dep of res . dependencies ! ) {
2765
2769
switch ( dep . type ) {
2766
2770
case 'url' :
You can’t perform that action at this time.
0 commit comments