A zero-configuration build tool for the web that bundles HTML, CSS, JavaScript and assets without a config file.
webpack/webpack
A JavaScript module bundler that packs many modules and assets into a few bundles, with code splitting and loaders for non-JS files.
- Stars
- 65,971
- Forks
- 9,492
- Open issues
- 118
- Last commit
- 7 hours ago
What is it?
Webpack is a module bundler that takes JavaScript modules and their dependencies and packs them into one or more bundled assets for use in a browser. It resolves dependencies at compile time, so the output carries less runtime overhead than loading modules individually.
It understands ES modules, CommonJS and AMD, including mixes of them in the same project. Code splitting lets it emit multiple chunks that load asynchronously at runtime, which reduces initial load time. Loaders preprocess other file types such as TypeScript, CSS, images and JSON, and a plugin system handles the remaining build tasks.
Webpack targets browsers that support ES5. It needs a Promise implementation for dynamic imports, and older browsers require a polyfill.
Key features
- 01Bundles ES modules, CommonJS and AMD modules, including mixed usage.
- 02Code splitting loads chunks asynchronously at runtime.
- 03Loaders transform TypeScript, CSS, images, JSON and other file types.
- 04A plugin system extends or customizes the build process.
- 05Dependencies are resolved at compile time to reduce runtime size.
Use cases
- Bundling a single-page web application for production deployment.
- Splitting a large front-end app so routes load on demand.
- Compiling TypeScript, Sass and assets into browser-ready files in one build pipeline.
Quick start
- 1
Install webpack with npm as a dev dependency
npm install --save-dev webpack - 2
Or install webpack with yarn as a dev dependency
yarn add webpack --dev - 3
Follow the Get Started guide on webpack.js.org to configure and run your first bundle
Things to know
- Browser bundling is its main focus, and it does not support IE8 and below.
- Using import() or require.ensure() requires Promise support, so older browsers need a polyfill.
Topics
FAQ
- What is webpack?
- A JavaScript module bundler that packs many modules and assets into a few bundles, with code splitting and loaders for non-JS files. Webpack is a module bundler that takes JavaScript modules and their dependencies and packs them into one or more bundled assets for use in a browser. It resolves dependencies at compile time, so the output carries less runtime overhead than loading modules individually.
- Is webpack free to use? What license does it have?
- webpack is open source under the MIT license. Check the license terms before using it in commercial products.
- Is webpack still maintained?
- Actively maintained. The last commit to webpack was on Oct 20, 2026.
- What can I use webpack for?
- Bundling a single-page web application for production deployment. Splitting a large front-end app so routes load on demand. Compiling TypeScript, Sass and assets into browser-ready files in one build pipeline.
- How do I install webpack?
- Install webpack with npm as a dev dependency: npm install --save-dev webpack Or install webpack with yarn as a dev dependency: yarn add webpack --dev Follow the Get Started guide on webpack.js.org to configure and run your first bundle
- Where can I get webpack?
- The source code and installation instructions are on GitHub: https://github.com/webpack/webpack
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An extremely fast JavaScript, TypeScript, JSX and CSS bundler with a CLI, JS and Go API.
A typed superset of JavaScript that adds optional static types and compiles to readable, standards-based JavaScript.
A experimental TypeScript and JavaScript compiler that turns programs into native executables or WebAssembly, without requiring Node.js at runtime.
A JavaScript library for building interactive user interfaces from composable components, usable on the web, server and native platforms.
Angular is a TypeScript-based platform for building web applications, with a CLI, routing, forms, SSR and Material components.