Skip to main content

Why is Webpack called a "modular bundler"?

Webpack is called a "modular bundler" because it:

  1. Treats files as modules. Every file (JS, CSS, image, font, JSON) is treated by Webpack as a module with its own dependencies.
  2. Builds a dependency graph. Webpack analyzes import and require statements, determines which modules depend on which, and builds a complete map of the project's connections.
  3. "Bundles" - combines modules into output files. After analyzing dependencies, Webpack assembles everything into one or several bundles: optimized files ready for the browser to load.

In short: modules → dependency graph → one bundle (or several bundles). Hence the term modular bundler: a tool that bundles modules together.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.