'admin-21.12.22:优化打包时警告问题'

This commit is contained in:
lyt 2021-12-22 21:39:41 +08:00
parent c1b4cf75ee
commit 5a50d3c681
1 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,22 @@ const viteConfig: UserConfig = {
},
},
},
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: (atRule) => {
if (atRule.name === 'charset') {
atRule.remove();
}
},
},
},
],
},
},
};
export default viteConfig;