szmetro2019

Results 9 comments of szmetro2019

@PanJiaChen 打扰了,作者,百忙之中,抽个空看下

忘了说现象 有时候,谷歌浏览器就会出现这个情况,偶尔 ![1111](https://user-images.githubusercontent.com/56266843/100826371-20344500-3495-11eb-94d6-5593faace1d8.png)

以前的包,就没有问题 ![222](https://user-images.githubusercontent.com/56266843/100826340-13afec80-3495-11eb-8222-5571c199b755.png)

> 想问下大佬们是不是使用了babel-plugin-component或babel-plugin-component-scss进行按需再次才出现这个问题,我的也是的项目打包乱码有的正常,区别就是乱码的用了按需约会和自定义主题 是的,引入了按需加载,关于你的建议,我去验证下。

> 想问下大佬们是不是使用了babel-plugin-component或babel-plugin-component-scss进行按需引入才出现这个问题,我的也是有的项目打包乱码有的正常,区别就是乱码的用了按需引入和自定义主题 没有按需加载,测试之后,依然有问题。

感觉与dart-sass没有关系,新建个项目,啥也没,只有dart-sass,就没有乱码,一定是其他原因引起的

> > 2、使用 [@charset](https://developer.mozilla.org/zh-cn/docs/web/css/@charset),不过这种方法我试了好久vue-cli编译后的css都没能把@charset ”UTF-8“输出,直接使用sass命令行编译是有的 > > https://github.com/webpack-contrib/sass-loader/blob/0db6fb61416052ad750383efb829e2c42a75a238/src/utils.js#L150-L153 > > https://github.com/sass/dart-sass/blob/ec0bab5538e6c6913c1f074f08d59ba6eb9bc3f6/lib/src/visitor/serialize.dart#L44-L79 > > 因为 sass-loader 会检查运行环境的模式,给 dart-sass 传入 `{ outputStyle: "compressed" }`。 > dart-sass 在这时会使用 BOM 而不是输出 `@charset`。 > >...

![Uploading QQ截图20231127135316.png…]()

import path from 'node:path'; import { fileURLToPath, URL } from 'node:url'; import vue from '@vitejs/plugin-vue'; import vueJsx from '@vitejs/plugin-vue-jsx'; import { resolve } from 'path'; import AutoImport from 'unplugin-auto-import/vite'; import...