- npm run dev triggers a chain of process spawning, module resolution, and file serving most developers have never fully traced.
- When you run npm run dev with Vite, your source code is never bundled — the browser fetches each file as a native ES module.
- Hot Module Replacement works by walking a lazy dependency graph, not scanning your entire codebase on every file save.
- React Fast Refresh preserves component state across edits by comparing hook signatures before deciding whether to reset anything.
You’ve Typed npm run dev a Thousand Times. Here’s What’s Actually Happening
Most developers have typed npm run dev so many times it’s practically muscle memory. Terminal opens, a few lines scroll past
Source: https://dev.to/lovestaco/what-happens-when-you-run-npm-run-dev-ae9

