Is it wrong for vue-cli to introduce sass?

follow the online tutorials:
1. Install the module

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

2. Modify webpack.config.js

  {
     test: /\.scss$/,
     loaders: ["style", "css", "sass"]
  },

3.static create a new sass file, style.sass

$primaryColor:-sharpf5d030;
.navbar-default .special_link a {
  background: $primaryColor;
  color: white;
}

4.main.js introduces sass

import "./../static/css/style.sass"

5.npm run dev error

clipboard.png

Apr.06,2021

check the last of the $primaryColor variable of your style.sass file; (semicolon) is in Chinese or not, pay attention to the mistakes in reading the newspaper


scss
sass

which point B step
when writing loader, the rule is to match the scss file, and then the import file in the js code is the sass file. This loader can take effect.
friends who step on the spot should change their careers as soon as possible

.
test: /\.s(c|a)ss$/,
Menu