I have small project (about 30 sass files), in sass
I am using @import
and @mixin
...
My webpack development build is take about 30s
(and still growing, last week it was 20s) and it is crazy...
My config is:
{
test: /\.scss$/,
exclude: /(node_modules|bower_components)/,
use: [
{
loader: "css-loader",
options: {
modules: {
localIdentName: '[local]___[hash:base64:5]',
},
sourceMap: false,
},
},
{
loader: 'sass-loader',
}
],
},
I need to speed up my local build... what is wrong with my config? Why it is so slow?
SMP ⏱
General output time took 27.82 secs
SMP ⏱ Plugins
MiniCssExtractPlugin took 0.001 secs
SMP ⏱ Loaders
css-loader, and
sass-loader took 27.14 secs
module count = 68
modules with no loaders took 1.56 secs
module count = 611
svg-sprite-loader took 0.204 secs
module count = 1
css-loader
that is slowing things down by using npmjs.com/package/speed-measure-webpack-plugin Then, probably use theinclude
option to apply your loaders only to the files that need it webpack.js.org/guides/build-performance/#loaders – Vickeyvickisass-loader
, as seen here with a similar issue #56262637 You might try to cache the loader github.com/webpack-contrib/cache-loader or this alternative loader github.com/yibn2008/fast-sass-loader ' – Vickeyvicki