JavaScript Module Bundlers

October 30, 2019 • ☕️ 1 min read

Module bundlers are tools that bundle JavaScript and non-JavScript modules into a bundle — web apps to run on browsers, backend apps to run on Node.js, or npm packages. Most of them can bundle JavaScript files into a single concatenated file or multiple files, but they are hugely different in the capability of bundling non-JavaScript files like css, json, png, xml, etc.

Module bundlers can be considered as limited task runners and built tools as well, like focusing on automating frontend tasks and generate a website only.

Webpack is the most popular and powerful module bundler for JavaScript applications (both frontend and backend), can load many kinds of files, has extensive plugin ecosystem, often used to pack web applications.

Rollup is a JavaScript module bundler, famous for tree shaking, often used to bundle JavaScript libraries.

Parcel is a zero-configuration module bundler, only used for web applications, has support for many common transforms and transpilers built-in out of the box.

Browserify is a tool for bundling Node packages for the browser, happens to work for browser-based apps pretending to be Node packages.

Metro is a JavaScript bundler for React Native

Microbundle is a zero-configuration bundler for tiny modules