vite · Vite Docs
Vite Vite Building for Production
Explains how to generate a production-ready build using the Vite CLI, including command usage and configuration for optimizing assets.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Vite Vite Building for Production
Explains how to generate a production-ready build using the Vite CLI, including command usage and configuration for optimizing assets.
When To Use
Use when you need to compile a Vite project for deployment or optimize assets for a production environment.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/vite-building-for-production-workflow-guide.md | A guide detailing production build processes, browser compatibility, base paths, and build customization for Vite. | Questions about a guide detailing production build processes, browser compatibility, base paths, and build customization for Vite. |
examples/vite-building-for-production-vite-build-config-defineconfig.text | A JavaScript configuration example using defineConfig to set up build options for Vite. | Exact payloads, commands, or snippets shown in A JavaScript configuration example using defineConfig to set up build options for Vite. |
examples/vite-building-for-production-vite-build-preload-error-handling.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/vite-building-for-production-vite-build-config-watch-options.text | A vite configuration file demonstrating the build watch options within the defineConfig function. | Exact payloads, commands, or snippets shown in A vite configuration file demonstrating the build watch options within the defineConfig function. |
examples/vite-building-for-production-vite-build-production-project-structure.text | A text representation of a project directory structure including package.json, vite.config.js, and nested HTML/JS files for a production build example. | Exact payloads, commands, or snippets shown in A text representation of a project directory structure including package.json, vite.config.js, and nested HTML/JS fil... |
examples/vite-building-for-production-vite-build-config-rolldown-options.text | A JavaScript configuration object demonstrating how to use rolldownOptions to define multiple input entry points in a Vite build. | Exact payloads, commands, or snippets shown in A JavaScript configuration object demonstrating how to use rolldownOptions to define multiple input entry points in a... |
examples/vite-building-for-production-vite-build-lib-mode-config.text | A vite configuration object demonstrating how to use the build library mode with entry points and external dependencies. | Exact payloads, commands, or snippets shown in A vite configuration object demonstrating how to use the build library mode with entry points and external dependencies. |
examples/vite-building-for-production-vite-build-lib-mode-config-2.text | A vite configuration object demonstrating how to use build library mode with multiple entry points and external dependencies. | Exact payloads, commands, or snippets shown in A vite configuration object demonstrating how to use build library mode with multiple entry points and external depen... |
examples/vite-building-for-production-vite-build-production-module-export.text | A text example demonstrating module export syntax within the context of Vite production builds. | Exact payloads, commands, or snippets shown in A text example demonstrating module export syntax within the context of Vite production builds. |
examples/vite-building-for-production-vite-build-command.text | The terminal output showing the results of running the vite build command for a production bundle. | Exact payloads, commands, or snippets shown in The terminal output showing the results of running the vite build command for a production bundle. |
examples/vite-building-for-production-vite-build-package-json-configuration.text | A package.json configuration example demonstrating the exports and entry point fields required for a library build. | Exact payloads, commands, or snippets shown in A package.json configuration example demonstrating the exports and entry point fields required for a library build. |
examples/vite-building-for-production-vite-build-package-json-exports-configurati.text | A package.json configuration demonstrating the exports field for library distribution in a Vite build. | Exact payloads, commands, or snippets shown in A package.json configuration demonstrating the exports field for library distribution in a Vite build. |
examples/vite-building-for-production-vite-build-package-json-exports-configurati-2.text | A package.json configuration example demonstrating the exports field for a library build using Vite. | Exact payloads, commands, or snippets shown in A package.json configuration example demonstrating the exports field for a library build using Vite. |
examples/vite-building-for-production-vite-build-experimental-renderbuilturl-conf.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/vite-building-for-production-vite-build-experimental-renderbuilturl-conf-2.text | A configuration example demonstrating the use of the experimental renderBuiltUrl function within the Vite build process. | Exact payloads, commands, or snippets shown in A configuration example demonstrating the use of the experimental renderBuiltUrl function within the Vite build process. |
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://vite.dev/guide/build