"We need Webpack presets" and "Webpack and its plugins are too hard to configure correctly" have been the number one cause of developer pain shared with me from large sites adopting Progressive Web Apps and optimising their load performance.
If I was building a Webpack preset pack for performance, I might use the following:
- Ensure you're using a production build of your framework:
new webpack.DefinePlugin({ 'process.env': env })
- Minify your JS:
webpack.optimize.UglifyJsPlugin
- Compress your resources (GZip): compression-webpack-plugin
- Split your vendor chunks: CommonsChunkPlugin