How to use SASS / SCSS with latest vue-cli starter project?

前端 未结 3 1169
忘掉有多难
忘掉有多难 2020-12-07 19:16

I need to use SASS or SCSS in my project.

I used the vue-cli to make the latest version of a starter project.

Anyone had any success in making sass/scss work

3条回答
  •  忘掉有多难
    2020-12-07 19:49

    Add this in your package.json in scripts and run

    "compile:sass": "node-sass 'your main scss file location' 'your compiled css file location' -w"
    

    Please make sure that node-sass and sass-loader are added properly.

    And then in you App.vue file add this, then run

    
    

    This works for me.

    Thanks

提交回复
热议问题