1、添加scss支持
npm install sass-loader node-sass webpack --save-dev
2、在webpack.base.conf.js中添加loader
{
test: /\.scss$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}, {
loader: "sass-loader"
}]
}
3、style中添加 lang='scss' (一定要单引号不然提示报错,找了好久才发现是用了双引号/::Q)