步骤一: 安装node-sass、sass-loader、style-loader、sass-resources-loader
cnpm install node-sass sass-loader style-loader sass-resources-loader --save
步骤二: 修改build中的utils.js
scss: generateLoaders('sass') 修改成: scss: generateLoaders('sass').concat( { loader: 'sass-resources-loader', options: { resources: path.resolve(__dirname, '../src/assets/style.scss') } } ),
步骤三:修改App.vue的style
<style lang="scss"></style>