vue files lang = "scss" error problem
New Project .vue file using scss writing style. According to the online tutorial to install centralized dependent module and the following error after configuration:
github URL: Personal blog
This is because we installed sass-loader version is too high, as long as we install the 7.3.1 version of sass-loader problem is solved. If other plug-ins installed: then only need to install version 7.3.1 on the line.
Specific methods are:
- Enter the following command:
npm install [email protected] --save-dev //这里安装的是7.3.1版本的sass-loader
npm install node-sass --save
npm install style-loader --save
- Add the following code in the module configuration file under the rules (if item generated using vue-cli scaffold, this step is omitted):
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
}
So that we can use the code lang = "scss" up, and not being given.