Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
619 views
in Technique[技术] by (71.8m points)

webpack sass-loader编译后,style输出并没有编译成功

webpack 使用sass-loader进行编译,但是在输出后的style中没有编译成功,如下图

clipboard.png
clipboard.png

clipboard.png
clipboard.png

编译不成功,还是scss时的样子,没有编译成css,导致页面识别不出。

有安装node-sass


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

可以参考:https://doc.webpack-china.org...
从scss到css有两种:
1.第一种直接将scss文件添加到bundle.js中。
2.第二种使用插件,输入scss,输出css。
如果不嫌弃的话,可以看看昨天我做的一个scss到css编译的demo。
https://github.com/FrankKai/V...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...