vite
Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
Best use case
vite is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "vite" skill to help with this workflow task. Context: Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/vite/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How vite Compares
| Feature / Agent | vite | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Guidance for Vite using the official Guide, Config Reference, and Plugins pages. Use when the user needs Vite setup, configuration, or plugin selection details.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## When to use this skill
Use this skill whenever the user wants to:
- Follow Vite Guide topics from getting started to performance
- Configure Vite using the official config reference
- Select or understand Vite plugins from the official plugins page
- Use Vite CLI, HMR API, or JavaScript API
- Handle SSR, backend integration, or deployment scenarios in Vite
## How to use this skill
1. **Identify the topic** from the user request.
2. **Open the matching guide example** file in `examples/guide/`.
3. **If configuration is needed**, open the matching file in `examples/config/`.
4. **If plugin selection is needed**, open `examples/plugins.md`.
5. **Follow official docs verbatim** and keep output consistent with the referenced page.
6. **Validate**: Run `npm run build` to verify config changes compile; `npm run preview` to test production output.
### Guide mapping (one-to-one with https://cn.vitejs.dev/guide/)
**Introduction**
- `examples/guide/getting-started.md` → https://cn.vitejs.dev/guide/
- `examples/guide/philosophy.md` → https://cn.vitejs.dev/guide/philosophy.html
- `examples/guide/why-vite.md` → https://cn.vitejs.dev/guide/why.html
**Guide**
- `examples/guide/features.md` → https://cn.vitejs.dev/guide/features.html
- `examples/guide/cli.md` → https://cn.vitejs.dev/guide/cli.html
- `examples/guide/using-plugins.md` → https://cn.vitejs.dev/guide/using-plugins.html
- `examples/guide/dep-pre-bundling.md` → https://cn.vitejs.dev/guide/dep-pre-bundling.html
- `examples/guide/assets.md` → https://cn.vitejs.dev/guide/assets.html
- `examples/guide/build.md` → https://cn.vitejs.dev/guide/build.html
- `examples/guide/static-deploy.md` → https://cn.vitejs.dev/guide/static-deploy.html
- `examples/guide/env-and-mode.md` → https://cn.vitejs.dev/guide/env-and-mode.html
- `examples/guide/ssr.md` → https://cn.vitejs.dev/guide/ssr.html
- `examples/guide/backend-integration.md` → https://cn.vitejs.dev/guide/backend-integration.html
- `examples/guide/troubleshooting.md` → https://cn.vitejs.dev/guide/troubleshooting.html
- `examples/guide/performance.md` → https://cn.vitejs.dev/guide/performance.html
- `examples/guide/migration.md` → https://cn.vitejs.dev/guide/migration.html
**APIs**
- `examples/guide/api-plugin.md` → https://cn.vitejs.dev/guide/api-plugin.html
- `examples/guide/api-hmr.md` → https://cn.vitejs.dev/guide/api-hmr.html
- `examples/guide/api-javascript.md` → https://cn.vitejs.dev/guide/api-javascript.html
**Environment API**
- `examples/guide/api-environment.md` → https://cn.vitejs.dev/guide/api-environment.html
- `examples/guide/api-environment-instances.md` → https://cn.vitejs.dev/guide/api-environment-instances.html
- `examples/guide/api-environment-plugins.md` → https://cn.vitejs.dev/guide/api-environment-plugins.html
- `examples/guide/api-environment-frameworks.md` → https://cn.vitejs.dev/guide/api-environment-frameworks.html
- `examples/guide/api-environment-runtimes.md` → https://cn.vitejs.dev/guide/api-environment-runtimes.html
### Config mapping (one-to-one with https://cn.vitejs.dev/config/)
- `examples/config/configuring-vite.md` → https://cn.vitejs.dev/config/
- `examples/config/shared-options.md` → https://cn.vitejs.dev/config/shared-options.html
- `examples/config/server-options.md` → https://cn.vitejs.dev/config/server-options.html
- `examples/config/build-options.md` → https://cn.vitejs.dev/config/build-options.html
- `examples/config/preview-options.md` → https://cn.vitejs.dev/config/preview-options.html
- `examples/config/dep-optimization-options.md` → https://cn.vitejs.dev/config/dep-optimization-options.html
- `examples/config/ssr-options.md` → https://cn.vitejs.dev/config/ssr-options.html
- `examples/config/worker-options.md` → https://cn.vitejs.dev/config/worker-options.html
### Plugins mapping (one-to-one with https://cn.vitejs.dev/plugins/)
- `examples/plugins.md` → https://cn.vitejs.dev/plugins/
### Inline Quick Start
```bash
# Create a new Vite project
npm create vite@latest my-app -- --template react-ts
# Install and run
cd my-app && npm install
npm run dev # Dev server with HMR
npm run build # Production build
npm run preview # Preview production build
```
```typescript
// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
server: {
port: 3000,
proxy: {
'/api': 'http://localhost:8080',
},
},
build: {
sourcemap: true,
rollupOptions: {
output: {
manualChunks: { vendor: ['react', 'react-dom'] },
},
},
},
});
```
## Best Practices
- Use `defineConfig` for TypeScript type hints and autocomplete
- Configure proxy in `server.proxy` for API calls during development
- Use `build.rollupOptions.output.manualChunks` for vendor splitting
- Enable source maps in development; disable in production for smaller builds
- Use `import.meta.env` for environment variables (prefix with `VITE_`)
## Resources
- Guide: https://cn.vitejs.dev/guide/
- Config: https://cn.vitejs.dev/config/
- Plugins: https://cn.vitejs.dev/plugins/
## Keywords
Vite, build tool, dev server, HMR, config, plugins, SSR, CLI, dependency pre-bundling, assetsRelated Skills
vitest
Provides comprehensive guidance for Vitest testing framework including fast test execution, Vite integration, component testing, mocking, and configuration. Use when the user asks about Vitest, needs to write fast unit tests, test Vue/React components, or configure Vitest with Vite projects.
vant-vue3
Provides structured guidance for Vant of Vue 3.0. Use when the user needs Vant with Vue 3, asks about mobile UI components such as Button, Cell, Form, Dialog, Toast, Popup, ConfigProvider, theme customization, project setup, or wants to implement mobile-first interfaces with vant or van- components.
layui-vue3
Provides comprehensive guidance for Layui Vue component library including components, layer dialogs, and utilities. Use when the user asks about Layui Vue, needs to use Layui components in Vue 3, or implement UI components.
element-plus-vue3
Provides comprehensive guidance for Element Plus Vue 3 component library including installation, components, themes, internationalization, and API reference. Use when the user asks about Element Plus for Vue 3, needs to build Vue 3 applications with Element Plus, or customize component styles.
bootstrap-vue3
Provides comprehensive guidance for Bootstrap Vue 3 component library including Bootstrap components, grid system, utilities, and Vue 3 integration. Use when the user asks about Bootstrap Vue 3, needs to use Bootstrap components in Vue 3, or implement responsive layouts.
vuex-vue2
Provides comprehensive guidance for Vuex 2.x state management in Vue 2 applications including state, mutations, actions, getters, modules, and plugins. Use when the user asks about Vuex for Vue 2, needs to manage state in Vue 2 applications, or implement Vuex patterns.
vue3
Guidance for Vue 3 using the official guide and API reference. Use when the user needs Vue 3 concepts, patterns, or API details to build components, apps, and tooling.
vue2
Provides comprehensive guidance for Vue 2.x development including Options API, components, directives, lifecycle hooks, computed properties, watchers, Vuex state management, and Vue Router. Use when the user asks about Vue 2, needs to create Vue 2 components, implement reactive data binding, handle component communication, or work with Vue 2 ecosystem tools.
vue-router
Provides comprehensive guidance for Vue Router including route configuration, navigation, dynamic routes, nested routes, route guards, programmatic navigation, and route meta. Use when the user asks about Vue Router, needs to set up routing, implement navigation guards, handle route parameters, or manage route transitions.
vue-router-v4
Provides comprehensive guidance for Vue Router v4 including route configuration, navigation, nested routes, route guards, and Vue 3 integration. Use when the user asks about Vue Router v4, needs to set up routing for Vue 3 applications, implement navigation guards, or work with Vue Router v4 features.
vue-router-v3
Guidance for Vue Router v3 using the official Installation, Guide, and API docs. Use when users need routing setup, navigation patterns, or API details for Vue 2 projects.
pinia
Provides comprehensive guidance for Pinia state management including stores, state, getters, actions, plugins, and TypeScript support. Use when the user asks about Pinia, needs to manage application state, create stores, implement state persistence, or migrate from Vuex.