-
Notifications
You must be signed in to change notification settings - Fork 23
设置 include unocss 无法转换 #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
可能顺序要变一下,试下把 |
不行,试了 |
设置 include 后 媒体查询模式页失效 |
include 的逻辑我记得是只有 include 包括的页面才转换,其他页面不转换,你的意思是 include 里的页面( |
s
是的, |
把 |
也不行。 |
ok,我最近有点忙,会抽空看下,可能回复较慢,我主要看下我本地运行 include 会不会转换包括的文件,不转换不包括的文件,如果能验证可能就是你的 include 路径有问题了。 |
您的操作系统是 Windows 吗,是的话正则匹配要注意路径分隔符号, 写了个只有 |
请问这个有解决方法了吗?项目中使用unocss,若设置include路径的话,这个路径中class的px会进行转换,但是该路径中使用到unocss,比如font-[12px]这些class都不能转换 |
是所有 UnoCSS 单位都不能转换吗,vue3-vant-mobile 这个模板也用了 UnoCSS,你看能不能参考下。 |
是的,如果不使用include的话,项目中unocss单位都是可以转换的。使用了include,指定某些文件路径,这个路径下的文件,自己写的class,px会转换成vw,但是这个文件中使用的unocss单位都不会进行转换 |
如果在include中多添加匹配 /__uno.css 的话,unocss单位可以转换,但是设置这个的话,好像整个项目都受影响,无法达到只处理某个文件这个预期 |
是不是 UnoCSS 会把所有的样式在编译的时候先放到一个中间产物文件里,就是放到 |
应该是,我之前unocss的样式直接写在行内,编译打包后不在当前文件路径,include指定的路径就无法转换,后面把unocss用@apply的方式写在style中,就可以转换了,已解决问题,谢谢哈 |
The text was updated successfully, but these errors were encountered: