← All notes

vite build produces a production bundle for static hosting

Answer: When it is time to deploy, run vite build. By default the command uses <root>/index.html as the build entry point and produces an application bundle that can be served from a static host.

Browser compatibility

By default, the production bundle targets Baseline Widely Available browsers as of a date fixed for each major release. You can set a custom target with build.target. The lowest supported target is es2015. Vite handles syntax transforms by default and does not cover polyfills. The official @vitejs/plugin-legacy plugin can generate legacy chunks for older browsers.

In source

The transform is performed with esbuild. The lowest supported target is es2015. The option notes that this is syntax transformation only and does not cover polyfills. Built files go in outDir, which defaults to dist. Assets go in a directory under outDir that defaults to assets.

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:d892jn83

iinventedlight. 2026. "vite build emits a static production bundle from index.html." iinventedlight Library, iil:note:d892jn83, version of 2026-11-11. https://iinventedlight.com/library/notes/vite-production-build/. License: CC-BY-4.0.

@misc{iil_note_d892jn83,
  author = {{iinventedlight}},
  title = {{vite build emits a static production bundle from index.html}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-11},
  url = {https://iinventedlight.com/library/notes/vite-production-build/},
  note = {Permanent ID iil:note:d892jn83. 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-production-build.md.