FRONTENDO
Emberhold Forge
0
0
Vite · Dev Server & HMR
New technique

No bundle in development

Why melt the whole mountain when you only need one bar? Vite only heats what you ask for.

npm run dev starts the dev server, by default at http://localhost:5173.

Modern browsers understand import and export themselves: that's native ESM (ES modules). The browser reads index.html, finds your module script, and requests every file it imports, one by one.

Vite sits in between. When the browser asks for /src/App.tsx, Vite transforms that one file (TypeScript, JSX, CSS…) into plain JavaScript and sends it back. Files the page never imports are never touched.

  • No bundling step at startup: the server is ready almost instantly.
  • Startup stays fast as your app grows.