主要有三个步骤
步骤1
1
2
|
npm install node-sass --save-dev npm install sass-loader --save-dev |
步骤2
打开webpack.base.config.js在loaders里面加上
1
2
3
4
|
{ test: /.scss$/, loaders: [ "style" , "css" , "sass" ] } |
步骤3
在需要用到scss的地方写上:
1
|
<style lang= "scss" scoped= "" type= "text/css" ></style> |