Profile webpack

setup

install https://github.com/stephencookdev/speed-measure-webpack-plugin

npm install --save-dev speed-measure-webpack-plugin

open the webpack config file – for me this was webpack.config.js

the file contained the following:

module.exports = {
  // ...
};   

which is changed to

const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");

const smp = new SpeedMeasurePlugin();

module.exports = smp.wrap({
  // ...
});

results

for me the biggest win I had this time was with babel-loader – adding the following options took around 75 seconds off the build time

options: {
  cacheCompression: false,
  cacheDirectory: true,
}

thanks to this article for the pointers

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.