Hot Module Replacement
HMR
ELI5 — The Vibe Check
HMR is the magic that makes your browser update instantly when you save a file — without refreshing the whole page and losing your app state. Change a button color, see it change immediately. No refresh, no lost data. It's like your code editor and browser are best friends sharing notes in real time.
Real Talk
Hot Module Replacement is a development server feature that replaces, adds, or removes modules at runtime without a full page reload. When a source file changes, only the affected module is swapped out while the application state is preserved. Vite and Webpack both implement HMR, with Vite's being significantly faster.
When You'll Hear This
HMR is why I can edit CSS without losing my form state.,HMR broke — the page is doing a full refresh on every save.,Vite's HMR is almost instant compared to Webpack's.
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...
HMR
HMR stands for Hot Module Replacement. It's the dev server trick that updates your browser in real time without a full refresh.
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.