Combined with online and many ineffective methods, are summarized as follows
Note that the installation vue, not npm! ! !
vue add style-resources-loader
Selected during installation less
Modify the root vue.config.js of patterns
parameters
const path = require("path");
module.exports = {
pluginOptions: {
"style-resources-loader": {
preProcessor: "less",
patterns: [path.resolve(__dirname, "src/global.less")]
}
}
};