Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

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

  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://v6.vite.dev/config