4 ms·
The biggest bottleneck in the JS ecosystem is the minified, and that is already kind of decoupled from the other tools. Webpack plays with Terser pretty closely
by shados 7y ago
The biggest bottleneck in the JS ecosystem is the minified, and that is already kind of decoupled from the other tools. Webpack plays with Terser pretty closely, but it's not particularly hard to do the minification as a separate step, or even write a Webpack plugin to replace the existing ones.
On large builds, minification is often as much as 80%+ of the build time, sometimes even if you include the unit tests! Most projects aren't particularly opinionated about their minification solution, either, so you can just swap it in. That makes it a very good place to start.
For development where minification isn't needed, Webpack is still slow, but it doesn't matter nearly as much. Even very large projects rebuild fairly quickly in dev server mode (assuming they're setup right), and if Webpack 5's persistent cache delivers, startup shouldn't be too bad either. It would still be great if the community made changes as you suggest to speed things up, but minification is really where efforts should start, IMO.