vite · Vite Docs
Vite v6 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 v6 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 build settings, configure the development server, or adjust dependency optimization and SSR behaviors in a Vite project.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/v6-vite-configuring-workflow-guide.md | A guide covering Vite v6 configuration topics including Intellisense, conditional, async, and environment variable usage. | Questions about a guide covering Vite v6 configuration topics including Intellisense, conditional, async, and environment variable us... |
examples/v6-vite-configuring-vite-v6-config.text | A text file demonstrating the basic structure and syntax for a Vite v6 configuration object. | Exact payloads, commands, or snippets shown in A text file demonstrating the basic structure and syntax for a Vite v6 configuration object. |
examples/v6-vite-configuring-vite-v6-config-cli-command.text | A text example demonstrating the use of the --config flag with the vite command 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 command to specify a custom configuration file. |
examples/v6-vite-configuring-vite-v6-user-config.text | A JavaScript configuration file demonstrating the Vite v6 UserConfig object structure. | Exact payloads, commands, or snippets shown in A JavaScript configuration file demonstrating the Vite v6 UserConfig object structure. |
examples/v6-vite-configuring-vite-v6-config-defineconfig.text | A JavaScript code example demonstrating the use of the defineConfig function to configure a Vite v6 project. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating the use of the defineConfig function to configure a Vite v6 project. |
examples/v6-vite-configuring-vite-v6-config-userconfig.text | A TypeScript example demonstrating how to define a configuration object using the UserConfig type in Vite v6. | Exact payloads, commands, or snippets shown in A TypeScript example demonstrating how to define a configuration object using the UserConfig type in Vite v6. |
examples/v6-vite-configuring-vite-v6-config-defineconfig-function.text | A JavaScript configuration example using the defineConfig function with conditional logic for serve and build commands. | Exact payloads, commands, or snippets shown in A JavaScript configuration example using the defineConfig function with conditional logic for serve and build commands. |
examples/v6-vite-configuring-vite-v6-config-defineconfig-async-function.text | An example of a Vite v6 configuration file using an asynchronous defineConfig function to fetch data. | Exact payloads, commands, or snippets shown in An example of a Vite v6 configuration file using an asynchronous defineConfig function to fetch data. |
examples/v6-vite-configuring-vite-v6-config-define-loadenv.text | A Vite configuration file demonstrating how to use loadEnv to inject environment variables into the define object. | Exact payloads, commands, or snippets shown in A Vite configuration file demonstrating how to use loadEnv to inject environment variables into the define object. |
examples/v6-vite-configuring-vite-v6-config-2.text | A text representation of a Vite v6 configuration object demonstrating various configuration options. | Exact payloads, commands, or snippets shown in A text representation of a Vite v6 configuration object demonstrating various configuration options. |
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 ,Debugging the Config File on VS Code .
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://v6.vite.dev/config