talira

A bundler for javascript and friends

open sourceMITself-hostablefree

webpack is a module bundler: it starts from your entry points, resolves every import, and packs the modules into a few bundles for the browser. It handles ES modules, CommonJS and AMD together, can split code into chunks that load on demand, and runs loaders that turn TypeScript, CSS, images and other files into modules on the way. Almost everything else is done by plugins. It's an OpenJS Foundation impact project.

Ways to install

Package managers

Problems it solves

  • bundle my JavaScript, CSS and images for production
  • split a large single-page app so each page only loads the code it needs
  • compile TypeScript and JSX into code browsers can run
  • add content hashes to file names so browsers cache them safely
  • a build tool flexible enough for an old React app with custom loaders
  • replace a pile of script tags with one dependency graph
  • hot reload changes in the browser while developing

Features

  • ES modules, CommonJS and AMD
  • code splitting and lazy-loaded chunks
  • loaders
  • plugin system
  • dependencies resolved at compile time

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what webpack does.

  1. esbuild An extremely fast bundler for the web
  2. Vite Next Generation Frontend Tooling

Compare webpack with the top 3