How to use sass-resources-loader with [email protected] to add global scss variables and mixins.
As 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";
        `
      }
    }
  }
};
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With