Selaa lähdekoodia

Merge pull request #8 from sapuser2017/patch-1

Update vite.config.js
若依 3 vuotta sitten
vanhempi
commit
2c952e5af0
1 muutettua tiedostoa jossa 17 lisäystä ja 0 poistoa
  1. 17 0
      vite.config.js

+ 17 - 0
vite.config.js

@@ -37,5 +37,22 @@ export default defineConfig(({ mode, command }) => {
         }
       },
     },
+     //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
+    css: {
+      postcss: {
+        plugins: [
+          {
+            postcssPlugin: 'internal:charset-removal',
+            AtRule: {
+              charset: (atRule) => {
+                if (atRule.name === 'charset') {
+                  atRule.remove();
+                }
+              }
+            }
+          }
+        ],
+      },
+    },
   }
 })