Web Dev//Vite

Bundler and dev server for frontend. Does two different things depending on the mode:


Bundler and dev server for frontend. Does two different things depending on the mode:

Dev mode (npm run dev, port 5173 by default):

Serves files from memory, no dist/ generated

HMR -- change a file, the browser updates the component without a full page reload

Built-in dev proxy -- can forward /api/* requests to another port (e.g. Wrangler on 8788)

Fast because it uses native ES modules instead of bundling everything

Build mode (npm run build):

Compiles all source into static files in dist/ (build)

Minifies, tree-shakes, code-splits, generates hashes for cache-busting

Uses Rollup under the hood

Vite only handles frontend. For backend (API, database), you need a separate process -- in the Cloudflare stack, that's Wrangler.