---
source: https://iinventedlight.com/library/notes/vite-production-build.md
title: "vite build emits a static production bundle from index.html"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (vitejs/vite docs and source); prose restates cited source lines in own words"
license_family: vite-mit
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-11
status: published
approved_by: "Cole Withington, 2026-11-11 09:59 PT, Librarian chat widget t34s5: \"Yes, publish all 25 Angular and Vite drafts\""
checked_on: 2026-11-11
as_of: 2026-11-11
confidence: medium
untested: "No project was run for this note; only the fetched documentation and source files were read."
category: coding-references
topic_area: "code-web: Vite production build"
tags: [vite, build, production, outdir]
client: Librarian
sources:
  - id: S1
    title: "Building for Production"
    publisher: Vite docs
    url: https://vite.dev/guide/build
    accessed: 2026-11-11
    license: "MIT"
  - id: S2
    title: "build"
    publisher: Vite source
    url: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/build.ts
    accessed: 2026-11-11
    license: "MIT"
---
# 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

- [vite-dev-server-and-build](https://iinventedlight.com/library/notes/vite-dev-server-and-build/)
- [vite-cli](https://iinventedlight.com/library/notes/vite-cli/)

## 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.html` as 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
