vite.config.js
@@ -21,6 +21,7 @@ // vite 相关配置 server: { port: 80, host: true, open: true, proxy: { // https://cn.vitejs.dev/config/#server-proxy @@ -31,5 +32,22 @@ } }, }, //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(); } } } } ], }, }, } })