CSS: setup scss in vue Example

By

CSS Example: This is the "setup scss in vue" Example. compiled from many sources on the internet by SimpleTutorials.org

setup scss in vue

npm i node-sass sass-loader

// create the path: styles/main.scss in your src directory
–src
  |––styles
  |––main.scss

// add this to your vue.config.js file in the root directory
module.exports = {
  css: {
    loaderOptions: {
      sass: {
        prependData: `@import "@/styles/_variables.scss";`
      }
    }
  }
};

vue sass loader



* Summary: This "setup scss in vue" CSS Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others