Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/main-vite-building-for-production-branch-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textAn 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.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://main.vite.dev/guide/build