当前位置:网站首页>vite打包构建时 @charset utf-8警告问题处理;
vite打包构建时 @charset utf-8警告问题处理;
2022-06-25 23:13:00 【Colesyn L.】
vite打包构建时 @charset utf-8警告问题处理;
今天在vite打包时出现了个警告 虽然不影响用户交互但是我还是觉得应该处理一下;
报错如下
解决办法
在 vite.config.ts中加入css/和resolve/plugins/server同级即可
css: {
postcss: {
plugins: [
{
postcssPlugin: 'internal:charset-removal',
AtRule: {
charset: atRule => {
if (atRule.name === 'charset') {
atRule.remove();
}
},
},
},
],
},
},
再次打包发现警告已经没了
边栏推荐
猜你喜欢

Compile the telegraph desktop side (tdesktop) using vs2022

C # operate with MySQL

AD20(Altium Designer) PCB 高亮网络

随便画画的

C#使用MySql进行操作

Vscode shortcut

返回值为Object型方法调用equals()

Ad20 (Altium designer) PCB highlight network

Web学习之TypeScript

Endnote IEEE Transactions on industrial electronics/tie/tpel reference format template
随机推荐
Comment promouvoir efficacement les produits
No executorfactory found to execute the application
Solve STM32 operation μ Solution to sudden failure of task scheduling in c/os-ii system
简单 deepclone
Learn to identify follow-up questions in dialogue Q & A
Redis的安装及启动
马斯克 VS 乔布斯,谁是21世纪最伟大的创业家
11.1.2 overview of Flink_ Wordcount case
10.2.2、Kylin_ Kylin installation, uploading and decompressing, verifying environment variables, starting and accessing
Megacli common command collation
Establish a j-link GDB cross debugging environment for Px4
使用VS2022編譯Telegram桌面端(tdesktop)
Web学习之TypeScript
Typescript for Web Learning
. user. PHP website installation problems caused by INI files
Atlas200dk brush machine
[从零开始学习FPGA编程-44]:视野篇 - 集成电路助力数字化时代高质量发展-1-集成电路芯片主要形态
How to effectively promote products
Endnote IEEE Transactions on industrial electronics/tie/tpel reference format template
ADC acquisition noise and comparison between RMS filter and Kalman filter