:132:1: warning: "@charse

2021-12-10  本文已影响0人  _十六

vite + vue3 + ts + element-plus 项目

编译 warning
解决方案
删除 @charset
修改vite.config.ts文件

css: {
    postcss: {
      plugins: [
        {
          postcssPlugin: 'internal:charset-removal',
          AtRule: {
            charset: (atRule) => {
              if (atRule.name === 'charset') {
                atRule.remove();
              }
            }
          }
        }
      ]
    }
}
上一篇 下一篇

猜你喜欢

热点阅读