Webpack has been around since 2012, and somehow we're all still using it in 2025. Despite Vite and esbuild trying their hardest to kill it, Webpack refuses to die because it just works for complex shit. Meta, Microsoft, and Airbnb still run their massive codebases on it, which tells you something about enterprise Stockholm syndrome.
The Problem Webpack Actually Solves
Back before Webpack, deploying JavaScript to browsers was a nightmare of script tags and pray-everything-loads-in-the-right-order. Webpack takes your mess of interconnected files and turns them into something browsers can actually understand. You run webpack
and it crawls through every import, require, and dependency to build a complete picture of what your app actually needs.
The genius (and curse) of Webpack is that it treats everything as a module. JavaScript, CSS, images, fonts - you can import literally anything. Want to import logo from './logo.png'
? Webpack says "sure, why not." This sounds great until you're debugging why your PNG import returns a base64 string in development but a file path in production.
Why It's Still Around in 2025
As of September 2025, Webpack 5.101.3 is the latest version, and it's actually gotten pretty good. Module Federation lets you share code between apps at runtime, which is either brilliant micro-frontend architecture or an overcomplicated way to avoid publishing packages - depending on who you ask.
Yes, Vite starts faster. Yes, esbuild builds faster. But Webpack has 15 years of production battle-testing and a plugin for literally everything. Need to inline SVGs? There's a plugin. Want to analyze your bundle? There's a plugin. Need to upload your build to three different CDNs while sending Slack notifications? Someone's probably written a plugin for that too.
How the Damn Thing Works
Webpack's architecture is actually clever, even if the config syntax makes you want to quit programming. It runs everything through a plugin system where loaders handle file transformations (TypeScript → JavaScript, Sass → CSS) and plugins handle everything else (optimization, file generation, making coffee).
The build process goes: find entry points, follow all the imports, transform files through loaders, apply plugins, then spit out bundles. Code splitting lets you break things into smaller chunks so users don't download your entire app on the first visit. Tree shaking removes unused code, though it's not as aggressive as you'd hope and usually requires you to configure it properly.