Shell/Bash: vue scss Example


Shell/Bash Example: This is the "vue scss" Example. compiled from many sources on the internet by

vue scss

npm install sass-loader node-sass style-loader --save-dev   

setup scss in vue

npm i node-sass sass-loader

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

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

vue.js use scss in balise style

// in terminal
// If you use npm
npm install sass-loader node-sass --save-dev
// If you use yarn 
yarn add sass-loader node-sass

// In your component

vue js sass

# /!\ if you work with [email protected], it seems [email protected] doesn't work
# So, in terminal:
yarn add node-sass [email protected]

vue add sass

vue sass loader

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