vue-cli创建vue项目中全局使用mixin
首先需要安装插件
npm install style-resources-loader vue-cli-plugin-style-resources-loader --save-dev
修改vue.config.js文件
pluginOptions: {
'style-resources-loader': {
preProcessor: 'scss',
patterns: [
// 路径根据具体需求更改
path.resolve(__dirname, 'src/styles/mixin.scss'),
path.resolve(__dirname, 'src/styles/flex.scss')
]
}
}
标签:scss,__,style,vue,解决方案,loader,定时,resources
From: https://www.cnblogs.com/wlw7890000/p/17631793.html