vite+ts 无法使用全局的scss #154
Unanswered
jinzhirong
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我的vite.config.ts配置文件中配置了我的scss全局变量声明文件,如下:
css:{
preprocessorOptions:{
sass:{
additionalData:
@use "~/styles/element/variables.module.scss.scss" as *;
//我曾尝试用@import,但问题依旧存在}
},
}
运行程序提示我无法使用该文件中声明的scss变量,但是同样的配置,我使用vite+javascript 却没有任何问题,仅在vite+typescript中会出现,scss给的回复是这不是scss核心问题,是vite的问题,我该怎么解决这个问题,我用的vite版本是4.3.0
Beta Was this translation helpful? Give feedback.
All reactions