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
- id: C1 claim: vite build uses index.html as the default entry and emits a static bundle. source: S1 evidence: "By default, it uses
<root>/index.htmlas the build entry point"
- id: C2 claim: Vite handles syntax transforms and does not cover polyfills by default. source: S1 evidence: "Vite only handles syntax transforms and does not cover polyfills."
- id: C3 claim: The lowest supported transform target is es2015. source: S2 evidence: "the lowest supported target is es2015."
- id: C4 claim: The default output directory is dist. source: S2 evidence: "@default 'dist'"
Sources
- [S1] Building for Production. Vite docs. https://vite.dev/guide/build . License: MIT. Accessed 2026-11-11.
- [S2] build. Vite source. https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.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 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.},
}
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.