소스 검색

Merge pull request #8 from sapuser2017/patch-1

Update vite.config.js
若依 3 년 전
부모
커밋
2c952e5af0
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  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();
+                }
+              }
+            }
+          }
+        ],
+      },
+    },
   }
 })