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
- id: C1 claim: Vite changed how code is served during development. source: S1 evidence: "it rethought how code should be served during development."
- id: C2 claim: Dependencies are pre-bundled once with fast native tooling. source: S1 evidence: "are pre-bundled once using fast native tooling, so they're ready instantly."
- id: C3 claim: Source code is served on demand over native ESM. source: S1 evidence: "is served on-demand over native ESM."
- id: C4 claim: A dev-only plugin lexes, resolves, rewrites and analyzes URL imports. source: S2 evidence: "Dev-only plugin that lexes, resolves, rewrites and analyzes url imports."
Sources
- [S1] Why Vite. Vite docs. https://vite.dev/guide/why . License: MIT. Accessed 2026-11-11.
- [S2] import analysis plugin. Vite source. https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/importAnalysis.ts . License: MIT. Accessed 2026-11-11.
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
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.},
}
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.