npm install node-sass --save-dev //安装node-sass npm install sass-loader --save-dev //安装依赖包sass-loader npm install style-loader --save-dev //安装style-loader
在build文件夹下的webpack.base.conf.js的module下 rules里面添加配置 { test: /\.sass$/, loaders: ['style', 'css', 'sass'] }