by mgaunard · 2y ago · 0 comments
What exactly is the point of a bundler in the rapid development cycle? If you want your web app to load up fast, it's better if you only need to redownload the parts that actually changed, so you're better off not bundling them.
With a slow bundler, that tradeoff made sense, but with a fast bundler, it is suboptimal.
Also, typically the application is split into multiple smaller bundles, so only a slice of the application is rebundled on change.
For development, you don't need to "bundle" at all but you still need to transpile.
Where applicable there simply does not exist a better caching strategy than fingerprint plus Cache-Control: immutable
The 99 other ones are still in the browser cache and don't need to be re-(down)loaded.
If I bundle everything, then I have to scrap and reload everything, which is probably great for the final user, but not the developer actively modifying it.