We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
vitejs
Learn more about funding links in repositories.
Report abuse
1 parent 4a89766 commit 8e4e932Copy full SHA for 8e4e932
packages/vite/src/node/plugins/css.ts
@@ -2695,6 +2695,7 @@ function isPreProcessor(lang: any): lang is PreprocessLang {
2695
2696
const importLightningCSS = createCachedImport(() => import('lightningcss'))
2697
2698
+const decoder = new TextDecoder()
2699
async function compileLightningCSS(
2700
id: string,
2701
src: string,
@@ -2760,7 +2761,10 @@ async function compileLightningCSS(
2760
2761
: undefined,
2762
})
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)
2768
for (const dep of res.dependencies!) {
2769
switch (dep.type) {
2770
case 'url':
0 commit comments