vite · Vite Docs
Building for Production | Vite (main branch)
Explains the process of generating a production-ready build using Vite, including command execution, output directory configuration, and handling assets.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Building for Production | Vite (main branch)
Explains the process of generating a production-ready build using Vite, including command execution, output directory configuration, and handling assets.
When To Use
Use when you need to configure or execute the command to bundle a Vite project for deployment to a production environment.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/main-vite-building-for-production-branch-workflow-guide.md | A guide detailing the vite build command, browser compatibility, public base paths, and build customization options. | Questions about a guide detailing the vite build command, browser compatibility, public base paths, and build customization options. |
examples/main-vite-building-for-production-branch-vite-build-config-defineconfig.text | A JavaScript configuration example demonstrating the use of defineConfig to set build options in Vite. | Exact payloads, commands, or snippets shown in A JavaScript configuration example demonstrating the use of defineConfig to set build options in Vite. |
examples/main-vite-building-for-production-branch-vite-build-preload-error-handli.text | A JavaScript code snippet demonstrating how to listen for the vite:preloadError event to trigger a page reload. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to listen for the vite:preloadError event to trigger a page reload. |
examples/main-vite-building-for-production-branch-vite-build-config-watch-options.text | A JavaScript configuration object demonstrating the build watch options within the Vite defineConfig function. | Exact payloads, commands, or snippets shown in A JavaScript configuration object demonstrating the build watch options within the Vite defineConfig function. |
examples/main-vite-building-for-production-branch-vite-build-production-project-s.text | A directory tree representation of a standard Vite project structure used for production builds. | Exact payloads, commands, or snippets shown in A directory tree representation of a standard Vite project structure used for production builds. |
examples/main-vite-building-for-production-branch-vite-build-config-rolldown-opti.text | A vite configuration object demonstrating how to use rolldownOptions to define multiple input entry points. | Exact payloads, commands, or snippets shown in A vite configuration object demonstrating how to use rolldownOptions to define multiple input entry points. |
examples/main-vite-building-for-production-branch-vite-build-lib-mode-config.text | A vite configuration file demonstrating how to use the library mode build option with custom entry points and external dependencies. | Exact payloads, commands, or snippets shown in A vite configuration file demonstrating how to use the library mode build option with custom entry points and externa... |
examples/main-vite-building-for-production-branch-vite-build-lib-mode-config-2.text | A vite configuration file demonstrating how to build a library with multiple entry points and external dependencies. | Exact payloads, commands, or snippets shown in A vite configuration file demonstrating how to build a library with multiple entry points and external dependencies. |
examples/main-vite-building-for-production-branch-vite-build-production-module-ex.text | An example demonstrating how to use import and export statements within a Vite project intended for production builds. | Exact payloads, commands, or snippets shown in An example demonstrating how to use import and export statements within a Vite project intended for production builds. |
examples/main-vite-building-for-production-branch-vite-build-command.text | A text representation of the terminal output generated when running the vite build command. | Exact payloads, commands, or snippets shown in A text representation of the terminal output generated when running the vite build command. |
examples/main-vite-building-for-production-branch-vite-build-package-json-exports.text | A package.json configuration demonstrating the exports field for a library build using Vite. | Exact payloads, commands, or snippets shown in A package.json configuration demonstrating the exports field for a library build using Vite. |
examples/main-vite-building-for-production-branch-vite-build-package-json-exports-2.text | A package.json configuration demonstrating the use of the exports field for library distribution. | Exact payloads, commands, or snippets shown in A package.json configuration demonstrating the use of the exports field for library distribution. |
examples/main-vite-building-for-production-branch-vite-build-package-json-exports-3.text | A package.json configuration demonstrating the exports field for a library build using Vite. | Exact payloads, commands, or snippets shown in A package.json configuration demonstrating the exports field for a library build using Vite. |
examples/main-vite-building-for-production-branch-vite-build-experimental-renderb.text | A configuration snippet demonstrating the experimental renderBuiltUrl option within the Vite build settings. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating the experimental renderBuiltUrl option within the Vite build settings. |
examples/main-vite-building-for-production-branch-vite-build-experimental-renderb-2.text | A configuration snippet demonstrating the experimental renderBuiltUrl function for customizing asset URL generation during the Vite build process. | Exact payloads, commands, or snippets shown in A configuration snippet demonstrating the experimental renderBuiltUrl function for customizing asset URL generation d... |
What This Skill Covers
- Are you an LLM? You can read better optimized documentation at /guide/build.md for this page in Markdown format
- Main sections:
Browser Compatibility ,Public Base Path ,Relative base ,Customizing the Build ,Chunking Strategy .
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://main.vite.dev/guide/build