STATIC MODULE BUNDLER
webpack packs many modules into a few bundled assets. Code splitting allows for loading parts of the application on demand — designed for modern JavaScript apps.
weekly downloads
GitHub stars
plugins published
current release
CONFIGURATION
A single config file is enough for most projects. Compose loaders to transform any input; reach for plugins when behavior is non-trivial.
// webpack.config.js
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
mode: 'production'
};Through loaders, modules can be CommonJS, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS — and your custom stuff.
WHY WEBPACK
The original module bundler. Used by Vercel, Shopify, GitHub, Microsoft, and most of the modern frontend stack.
Share code across separately-deployed applications at runtime. The micro-frontend pattern, done right.
Split bundles by route, by demand, or by vendor. Load what's needed, when it's needed.
Static analysis of ES modules eliminates dead code in production builds — automatically.
Edit and see the result without losing application state. The fastest feedback loop in JavaScript tooling.
v5's filesystem cache makes warm builds near-instant. Cold builds are 38% faster than v4 on large monorepos.
The largest ecosystem in JavaScript tooling. If a build problem exists, there's a webpack plugin for it.
TRUSTED BY