全局引入样式报错
来源:1-1 课程导学
慕慕9563253
2021-04-12
引入全局scss报以下错误:
ERROR Failed to compile with 1 error 下午9:10:10
error in ./src/assets/scss/index.scss
Syntax Error: SassError: Undefined variable: “$color-background”.
on line 6 of src/assets/scss/base.scss
from line 3 of /Users/hui/project/test1/musicapp/src/assets/scss/index.scss
background: $color-background;
--------------^
@ ./src/assets/scss/index.scss 4:14-234 15:3-20:5 16:22-242
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.103:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
1回答
-
Daniel9878946
2021-04-15
看起来是因为sass的全局变量没有引入,确认下你的vue.config.js中的内容和课里的是否一致,课里也强调过node-sass和sass-loader的版本问题,在你的package.json中看看
00
相似问题