vite · Vite Docs
Vite v5 Vite Configuring
Explains how to customize the Vite development environment and build process through the configuration file, covering shared, server, build, preview, dependency optimization, SSR, and worker options.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Vite v5 Vite Configuring
Explains how to customize the Vite development environment and build process through the configuration file, covering shared, server, build, preview, dependency optimization, SSR, and worker options.
When To Use
Use when you need to modify development server behavior, configure build output settings, or adjust dependency pre-bundling and SSR settings in a Vite project.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/v5-vite-configuring-workflow-guide.md | A guide covering Vite v5 configuration topics including Intellisense, conditional, async, and environment variable usage. | Questions about a guide covering Vite v5 configuration topics including Intellisense, conditional, async, and environment variable us... |
examples/v5-vite-configuring-vite-v5-config-js.text | A JavaScript configuration file demonstrating the basic structure and options for a Vite v5 project. | Exact payloads, commands, or snippets shown in A JavaScript configuration file demonstrating the basic structure and options for a Vite v5 project. |
examples/v5-vite-configuring-vite-v5-config-cli-command.text | A text example demonstrating the use of the --config flag with the vite CLI to specify a custom configuration file. | Exact payloads, commands, or snippets shown in A text example demonstrating the use of the --config flag with the vite CLI to specify a custom configuration file. |
examples/v5-vite-configuring-vite-v5-user-config.text | A JavaScript configuration file demonstrating the Vite UserConfig type and basic configuration structure for Vite version 5. | Exact payloads, commands, or snippets shown in A JavaScript configuration file demonstrating the Vite UserConfig type and basic configuration structure for Vite ver... |
examples/v5-vite-configuring-vite-v5-config-defineconfig.text | A JavaScript code example demonstrating the use of the defineConfig function to configure a Vite v5 project. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the use of the defineConfig function to configure a Vite v5 project. |
examples/v5-vite-configuring-vite-v5-config-userconfig.text | A TypeScript example demonstrating how to define a Vite configuration object using the UserConfig type. | Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to define a Vite configuration object using the UserConfig type. |
examples/v5-vite-configuring-vite-v5-config-defineconfig-callback.text | A JavaScript configuration example using the defineConfig callback function to return conditional settings based on command and mode. | Exact payloads, commands, or snippets shown in A JavaScript configuration example using the defineConfig callback function to return conditional settings based on c... |
examples/v5-vite-configuring-vite-v5-config-defineconfig-async-function.text | An example of a Vite v5 configuration file using an asynchronous defineConfig function to fetch data. | Exact payloads, commands, or snippets shown in An example of a Vite v5 configuration file using an asynchronous defineConfig function to fetch data. |
examples/v5-vite-configuring-vite-v5-config-define-loadenv.text | A Vite configuration file demonstrating how to use defineConfig and loadEnv to inject environment variables into the client-side code via the define option. | Exact payloads, commands, or snippets shown in A Vite configuration file demonstrating how to use defineConfig and loadEnv to inject environment variables into the... |
What This Skill Covers
- When running vite from the command line, Vite will automatically try to resolve a config file named vite.config.js inside project root (other JS and TS exten...
- Main sections:
Config Intellisense ,Conditional Config ,Async Config ,Using Environment Variables in Config .
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://v5.vite.dev/config