vue add style-resources-loader
在生成的vue.config.js中配置
const path = require('path')
module.exports = {
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [path.resolve(__dirname, 'src/assets/css/common.less')]
}
}
}
重新运行