Webpack 4 already has some optimizations presets for production mode, such as the code minification (before it was made with UglifyJS), but there are more things we can use to improve the performance of our application. In this recipe, we are going to learn how to split bundles (vendors and application bundles), add source maps, and implement the BundleAnalyzerPlugin.
Webpack 4 Optimization – Splitting Bundles
Getting Ready
For this recipe, we need to install the following packages:
npm install webpack-bundle-analyzer webpack-notifier
How to do it...
Let...