Vue project sass syntax how to use?

Recently started Vue framework, ravaged by a variety of error, which is a sass grammar, add <style> tag <style lang="scss">, an error was found in the Internet to find some solutions was chaotic, here is my pro-test practical methods, to give you a share!

In the Chrome browser error:

Write pictures described here
Sass-loader is unable to resolve this kind of thing. 
So the first step needs to be introduced in the project:

 1. npm install sass-loader -D

 

 2..npm install node-sass -D

Soon to introduce the first success: 
Write pictures described here 
but in the second they went wrong: 
Write pictures described here 
but I use cnpm install node-sass -D it a success! ! ! (Now more slag, do not know why) 
Write pictures described here
so that the project can be executed successfully: 
Write pictures described here 

Guess you like

Origin www.cnblogs.com/fxwoniu/p/11275214.html