一、安裝sass的依賴包css
npm install --save-dev sass-loader vue
//sass-loader依賴於node
node-sass npm install --save-dev node-sasswebpack
二、在build文件夾下的webpack.base.conf.js的rules裏面添加配置web
{ npm
test: /\.sass$/,sass
loaders: ['style', 'css', 'sass'] ui
}spa
三、在APP.vue中修改style標籤3d
<style lang="scss">