vite · Vite Docs
Vite Vite Environment API
Explains how to use the Vite Environment API to manage different execution contexts and handle environment-specific logic during development and build processes.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Vite Vite Environment API
Explains how to use the Vite Environment API to manage different execution contexts and handle environment-specific logic during development and build processes.
When To Use
Use when you need to implement environment-specific logic or manage different execution contexts within a Vite-based project.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/vite-environment-api-workflow-guide.md | A markdown guide explaining the Vite Environment API, including configuration and custom environment instances. | Questions about a markdown guide explaining the Vite Environment API, including configuration and custom environment instances. |
examples/vite-environment-api-config.text | A configuration example demonstrating the use of the Vite Environment API within a defineConfig object. | Exact payloads, commands, or snippets shown in A configuration example demonstrating the use of the Vite Environment API within a defineConfig object. |
examples/vite-environment-api-configuration.text | A configuration object demonstrating how to define build and environment-specific settings for the Vite Environment API. | Exact payloads, commands, or snippets shown in A configuration object demonstrating how to define build and environment-specific settings for the Vite Environment API. |
examples/vite-environment-api-options-interface.text | The TypeScript interface definition for EnvironmentOptions within the Vite Environment API. | Exact payloads, commands, or snippets shown in The TypeScript interface definition for EnvironmentOptions within the Vite Environment API. |
examples/vite-environment-api-userconfig-interface-definition.text | A TypeScript interface definition showing how UserConfig extends EnvironmentOptions for configuring Vite environments. | Exact payloads, commands, or snippets shown in A TypeScript interface definition showing how UserConfig extends EnvironmentOptions for configuring Vite environments. |
examples/vite-environment-api-custom-environment.text | A code example demonstrating how to use the customEnvironment function to define environment-specific build configurations in Vite. | Exact payloads, commands, or snippets shown in A code example demonstrating how to use the customEnvironment function to define environment-specific build configura... |
What This Skill Covers
- Are you an LLM? You can read better optimized documentation at /guide/api-environment.md for this page in Markdown format
- Main sections:
Formalizing Environments ,Closing the Gap Between Build and Dev ,Environments Configuration ,Custom Environment Instances ,Backward Compatibility .
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/api-environment