A bundler is a tool that recursively follows all imports from the entry point of your app and bundles them up into a single file.
Bundlers can also minify your files by removing unnecessary white spaces, newlines, and comments without affecting the functionality.
The most popular bundlers are Rollup, Parcel and Webpack. Which one is your favorite bundler and why?
Latest comments (23)
Right now Rollup because it is the packager that Svelte has standardized on. But, they are talking of moving to Snowpak.
parcel & webpack
Just familiar with Rollup + Terser, but I will give esbuild a try.
Snowpack. Integrates with Rollup and webpack in prod build
I REALLY like that the entrypoint for Parcel can be your HTML page. I see html-webpack-plugin as an afterthought. I'd switch to Rollup anytime if it could use HTML as the entrypoint!
Are there a good resource where I can learn how can I switch to a different bundler than the default one?
ClichΓ© answer: 'Right tool for right job.'
M NS π about Rollup, but for 'quick' 'vanilla SPA' or very simple React, Parcel.
For most other things, Webpack.
Bundling is sooo, HTTP1.1 but nobody seems to have gotten the memo. π
Rollup for packages because I can export to CJS, ES, UMD, and IIFE. I use Webpack basically only in CRA where I can't customize it and I use Parcel for small projects.
Snowpack sounds promising.
It's pretty good, more of an unbundler which should perform better than a bundler on HTTP2 and upwards.