Bundle
ELI5 — The Vibe Check
Imagine your code is a pile of LEGO instructions split across 50 tiny papers. A bundle is when someone combines all those papers into one neat booklet so the browser only has to read one thing instead of 50. Less trips = faster website.
Real Talk
A bundle is the output file (or set of files) produced by a build tool that combines multiple source modules, assets, and dependencies into a format optimized for delivery to the browser. Bundling reduces the number of HTTP requests and enables transformations like transpilation and minification.
Show Me The Code
// Before bundling: 3 separate files
// main.js, utils.js, helpers.js
// After bundling: one output file
// dist/bundle.js (contains all three merged)
When You'll Hear This
The production bundle is only 42KB after minification.,Run 'npm run build' to generate the bundle.,Our bundle grew too large, so we split it by route.
Related Terms
Bundler
A bundler is the robot that smashes all your separate JavaScript files, CSS, images, and random imports into one (or a few) neat packages that the browser...
Code Splitting
Instead of sending the user one massive JavaScript file for your entire app, code splitting lets you break it into chunks and only send what's needed for t...
Minify
Minification is when your code goes on a diet.
Vite
Vite is what happens when someone got sick of waiting 30 seconds for Webpack to start.
Webpack
Webpack is the OG bundler — the grumpy grandpa of the JavaScript build world.