Vue3 - 报错 warnings when minifying css: warning: “@charset“ must be the first rule in the file @chars

Problem Description

As long as your error message is 80% similar to mine (the following are 2 errors, it's okay if you only have one of them), you can solve it.

During the development of the vue3+vite project, the following error occurred:

warnings when minifying css:
> <stdin>:19:0: warning: “@charset” must be the first rule in the file
@charset “UTF-8”;


<stdin>:2:0: note: This rule cannot come before a “XXX” rule

insert image description here

solution

Follow the steps below to solve it 100% successfully.

Guess you like

Origin blog.csdn.net/weixin_44198965/article/details/132719902