webpack
The JavaScript bundler built around code splitting, loaders and plugins: written in JavaScript, highly configurable, and still downloaded tens of millions of times a week.
OpenJS · Impact- What it is
- Bundlers and dev servers
- Used for
- Build tools
- Type
- Open source
- Made by
- OpenJS Foundation
- Foundation
- OpenJS Foundation, impact, joined March 2019. A founding project, from the JS Foundation it joined in 2016. Part of the Linux Foundation
- License
- MIT
- Facts checked
- 28 October 2026
What it is
webpack is a static module bundler. Starting from one or more entry points, it follows every import and require to build a dependency graph, then writes the modules into one or more bundles to serve. Out of the box it understands JavaScript, JSON and WebAssembly. Anything else goes through loaders, functions that turn a file into modules (babel-loader for modern syntax, ts-loader for TypeScript), while plugins hook into the whole compilation for jobs such as minifying, injecting environment variables or writing HTML. Since webpack 4 a config file is optional: it bundles ./src/index.js into ./dist/main.js, and mode switches between development and production defaults.
webpack 5, released on October 10, 2020, is still the current major; version 5.112 came out in October 2026. It added an opt-in persistent file-system cache, asset modules, and Module Federation, which lets separately built and deployed apps load modules from each other at run time. It also stopped polyfilling Node.js core modules for the browser. The 2026 roadmap moves common plugins into the core: native CSS and HTML entry points as experiments options, TypeScript tsconfig paths (shipped in 5.105) and, later, TypeScript without a loader, ahead of a webpack 6 that has no release date.
Its position has changed. Faster tools have taken over new projects: Vite, which builds with Rolldown since Vite 8, now has more than three times webpack’s npm downloads, and Next.js 16 (October 2025) made Turbopack its default and kept webpack behind a --webpack flag. ByteDance’s Rspack, written in Rust, implements webpack’s API and runs most of its loaders and plugins, as a faster drop-in replacement. webpack itself is maintained mostly by volunteers. In the week to October 27, 2026 it was still downloaded about 63 million times from npm, against about 212 million for Vite.
Why teams pick it
- Fine control over output: code splitting at every dynamic
import(),splitChunksrules for shared code, and content-hashed file names for long-term caching - Module Federation for loading code from separately deployed builds at run time
- A huge ecosystem of loaders and plugins, and a stable API that Rspack also implements, so large existing setups keep working
- Persistent caching makes rebuilds of large projects much faster after the first one
Watch out for
- Written in JavaScript: cold builds and dev-server start-up are slower than Rust and Go bundlers such as Rspack, Rolldown and esbuild
- Configuration grows quickly; loaders, plugins and their interactions are a common source of hard-to-debug builds
- The dev server bundles the app before serving it, unlike Vite, which serves source modules on demand
- Volunteer-maintained with no full-time team, and frameworks such as Next.js have moved their defaults to other bundlers
Alternatives
What all bundlers and dev servers have in common →Compare side by side →How it fits with other technologies
What webpack uses
A production config with caching, a split vendor chunk and native CSS · js
// webpack.config.js
import path from 'node:path';
export default {
mode: 'production',
entry: './src/index.js',
output: {
path: path.resolve(import.meta.dirname, 'dist'),
filename: '[name].[contenthash].js', // new hash only when the content changes
clean: true,
},
module: {
rules: [{ test: /\.ts$/, use: 'ts-loader' }], // loaders turn other files into modules
},
resolve: { extensions: ['.ts', '.js'] },
experiments: { css: true }, // import './app.css' without css-loader or plugins
cache: { type: 'filesystem' }, // reuse work between builds
optimization: {
splitChunks: { chunks: 'all' }, // node_modules code goes into its own chunk
},
};
// $ npx webpack
// every dynamic import('./chart.ts') in the source also becomes its own chunkSee it in a real stack
No architecture uses webpack yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2012–2026
Tobias Koppers came to JavaScript from Java, where Google Web Toolkit could split an application into pieces loaded on demand. He missed that in JavaScript tooling, proposed it to the modules-webmake bundler, and when the change did not go forward wrote his own bundler in 2012. Instagram’s front-end team found an early version and adopted it, partly for code splitting, and Pete Hunt’s talk about it at OSCON in 2014 brought it a wide audience.
webpack 1.0 came out in February 2014. It followed imports itself, used loaders to bring CSS, images and other files into the same dependency graph, and split code at chosen points. webpack 4 (February 2018) introduced mode and made configuration optional, and webpack 5 (October 2020) added persistent caching and Module Federation. The project joined the JS Foundation at its launch on October 17, 2016, and became part of the OpenJS Foundation when that merged with the Node.js Foundation in March 2019.
In the 2020s faster tools written in Go and Rust took over new projects; Koppers himself is on the team behind Turbopack, which Next.js 16 made its default bundler in October 2025. webpack’s 2026 roadmap, from its technical steering committee, aims to keep it a “stable and well-supported choice” by folding common plugins into the core and preparing webpack 6, while asking for donations to pay its volunteer contributors.
Why it’s built this way
- Code splitting from the start
- Koppers wanted GWT’s ability to load parts of an app on demand. Building bundles around split points let large apps such as Instagram load only the code a page needs.
- Everything is a module, through loaders
- Treating CSS, images and other files as modules that loaders transform let one dependency graph cover the whole front end, instead of separate pipelines per file type.
- Zero configuration with modes (webpack 4)
- Every project had to write a config file, even when it needed nothing beyond an entry and an output. Defaults for those, plus a production or development
modethat turns on the matching optimisations, let small projects start without one. - Move common plugins into the core (2026 roadmap)
- CSS extraction, HTML generation and TypeScript each needed a separate plugin or loader. Building them in reduces dependencies and gives a volunteer team fewer packages to maintain.
Timeline
- 2012
Tobias Koppers starts webpack
- 2014
webpack 1.0 in February; Instagram’s use presented at OSCON
- 2016
Joins the JS Foundation at its launch on October 17
- 2018
webpack 4 in February:
modeand optional configuration - 2019
Becomes a founding project of the OpenJS Foundation
- 2020
webpack 5 on October 10: persistent caching and Module Federation
- 2025
Next.js 16 switches its default bundler to Turbopack
- 2026
Roadmap folds CSS, HTML and TypeScript support into the core ahead of webpack 6
- SurviveJS: Webpack, foreword by Tobias Koppers (GWT, modules-webmake, Instagram, OSCON 2014)
- GitHub ReadME: Unseen OSS (webpack’s origin in 2012)
- npm registry: webpack (release dates of 1.0.0, 4.0.0 and 5.0.0)
- Linux Foundation: The Linux Foundation unites JavaScript community for open web development (JS Foundation, October 17, 2016)
- webpack blog: webpack 5 release (October 10, 2020)
- Next.js blog: Next.js 16 (Turbopack the default bundler, October 21, 2025)
- webpack blog: Roadmap 2026 (February 4, 2026)
Sources10 · facts checked 28 October 2026
- webpack docs: Concepts (dependency graph, entry, output, loaders, plugins, mode, zero config since 4.0)
- webpack blog: webpack 5 release (persistent caching, Module Federation, asset modules, no Node.js polyfills)
- webpack blog: Roadmap 2026 (native CSS and HTML, tsconfig paths in 5.105, volunteers, webpack 6)
- npm registry: webpack versions (5.112.2, October 23, 2026)
- npm downloads API: webpack, week of October 21–27, 2026
- npm downloads API: vite, week of October 21–27, 2026
- Vite blog: Vite 8.0 is out! (Rolldown as Vite’s bundler, March 2026)
- Next.js blog: Next.js 16 (Turbopack default, `--webpack` to opt out)
- Rspack docs: Introduction (webpack-compatible API, loaders and plugins, Rust)
- OpenJS Foundation: Projects (webpack is an Impact project)