Answer the question
In order to leave comments, you need to log in
How to replace less in webpack.config/package.json with sass?
Good time of the day. I have a ready assembly, I need to do the project urgently, there is no way to understand webpack right now. Please help me replace the less preprocessor with sass(scss). Thanks a lot. webpack.config.js and
package.json are available on codepen.
webpack.config.js:
https://codepen.io/PolyakhAlex/pen/LjWQqe?editors=1010
package.json:
https://codepen.io/PolyakhAlex/pen/LjWQqe?editors=1010
Answer the question
In order to leave comments, you need to log in
In package.json replace:
less -> node-sass
less-loader -> sass-loader
{
test: /\.less$/,
loader: 'style' +
'!css?sourceMap' +
'!autoprefixer-loader?browsers=last 2 version' +
'!less?sourceMap=source-map-less-inline'
}
{
test: /\.scss$/,
loader: 'style-loader' +
'!css-loader?sourceMap' +
'!autoprefixer-loader?browsers=last 2 version' +
'!sass-loader?sourceMap'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question