diff --git a/vite.config.ts b/vite.config.ts index c8f76d7..a36a778 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -109,7 +109,22 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { // 在less文件中启用内联JavaScript,目前已经被弃用 javascriptEnabled: true, } - } + }, + postcss: { + plugins: [ + { + // 消除含义中文vxe-table样式@charset:UTF-8警告 + postcssPlugin: 'internal:charset-removal', + AtRule: { + charset: (atRule) => { + if (atRule.name === 'charset') { + atRule.remove(); + } + } + } + } + ], + }, }, // 项目使用的vite插件太多,单独提取管理,便于维护 plugins: createVitePlugins(viteEnv, isBuild),