← All notes

Vite split dev work into pre-bundled dependencies and on-demand source

Answer: Vite was created because large projects were seeing slow dev server startups, sluggish hot updates, and long production builds. Rather than only improving existing bundlers, it changed how code is served during development.

When Vite first appeared, browsers had gained wide support for ES modules (ESM), which can load JavaScript files directly without bundling them first. Traditional bundlers processed the entire application before anything could be shown. Vite split the work in two. Dependencies, which rarely change, are pre-bundled once with fast native tooling. Source code, which changes often, is served on demand over native ESM. The browser loads only what the current page needs.

In source

A dev-only plugin lexes, resolves, rewrites, and analyzes URL imports. Imports are resolved so they exist on disk. Bare module imports are resolved to absolute file paths. For example, import 'foo' is rewritten to a /@fs/ path under node_modules.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources and notices: Vite documentation and source (vitejs/vite): Copyright (c) 2019-present, VoidZero Inc. and Vite contributors; MIT (https://raw.githubusercontent.com/vitejs/vite/main/LICENSE). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Vite docs and Vite source (vitejs/vite), MIT. Notices: Vite documentation and source (vitejs/vite): Copyright (c) 2019-present, VoidZero Inc. and Vite contributors; MIT (https://raw.githubusercontent.com/vitejs/vite/main/LICENSE).

Cite this

Permanent ID: iil:note:ks8p8hdf

iinventedlight. 2026. "Vite serves source over native ESM and pre-bundles dependencies." iinventedlight Library, iil:note:ks8p8hdf, version of 2026-11-11. https://iinventedlight.com/library/notes/vite-native-esm/. License: CC-BY-4.0.

@misc{iil_note_ks8p8hdf,
  author = {{iinventedlight}},
  title = {{Vite serves source over native ESM and pre-bundles dependencies}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-11},
  url = {https://iinventedlight.com/library/notes/vite-native-esm/},
  note = {Permanent ID iil:note:ks8p8hdf. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/vite-native-esm.md.