Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/vite-building-for-production-workflow-guide.mdA 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.textA 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.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/vite-building-for-production-vite-build-config-watch-options.textA 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.textA 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.textA 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.textA 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.textA 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.textA 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.textThe 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.textA 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.textA 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.textA 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.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/vite-building-for-production-vite-build-experimental-renderbuilturl-conf-2.textA 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

  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://vite.dev/guide/build