How to use sass-resources-loader with vue-cli@3.x to add global scss variables and mixins.
See Question&Answers more detail:osHow to use sass-resources-loader with vue-cli@3.x to add global scss variables and mixins.
See Question&Answers more detail:osAs you can see in the docs, the easiest way is to use loaderOptions for the sass preprocessor. No need for any extra dependency:
module.exports = {
css: {
loaderOptions: {
sass: {
prependData: `
@import "@/scss/_variables.scss";
@import "@/scss/_mixins.scss";
`
}
}
}
};