Skip to content
Frontend
Skill

/vite

Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.

From plugin
skills
6.1k14 skills

Claude Code

$ npx -y skills add antfu/skills --skill vite --agent claude-code

SKILL.md

vite.SKILL.md
name: vite
description: Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.
metadata:
  author: Anthony Fu
  version: "2026.11.5"
  source: Generated from https://github.com/vitejs/vite, scripts at https://github.com/antfu/skills

Vite

> Based on Vite v8.3.5 (Rolldown-powered), generated at 2026-11-05. Vite 8 uses the Rolldown bundler and the Oxc transformer instead of esbuild + Rollup.

Vite is a next-generation frontend build tool with fast dev server (native ESM + HMR) and optimized production builds.

Preferences

  • Use TypeScript: prefer `vite.config.ts`
  • Always use ESM, avoid CommonJS

Core

| Topic | Description | Reference | |-------|-------------|-----------| | Configuration | `vite.config.ts`, `defineConfig`, conditional configs, `loadEnv` | [core-config](references/core-config.md) | | Features | `import.meta.glob`, asset queries (`?raw`, `?url`), `import.meta.env`, HMR API | [core-features](references/core-features.md) | | Plugin API | Vite-specific hooks, virtual modules, plugin ordering | [core-plugin-api](references/core-plugin-api.md) |

Build & SSR

| Topic | Description | Reference | |-------|-------------|-----------| | Build & SSR | Library mode, SSR middleware mode, `ssrLoadModule`, JavaScript API | [build-and-ssr](references/build-and-ssr.md) |

Advanced

| Topic | Description | Reference | |-------|-------------|-----------| | Environment API | Vite 6+ multi-environment support, custom runtimes | [environment-api](references/environment-api.md) | | Rolldown Migration | Vite 8 changes: Rolldown bundler, Oxc transformer, config migration | [rolldown-migration](references/rolldown-migration.md) |

Quick Reference

CLI Commands

vite              # Start dev server
vite build        # Production build
vite preview      # Preview production build
vite build --ssr  # SSR build

Common Config

import { defineConfig } from 'vite'

export default defineConfig({
  plugins: [],
  resolve: { alias: { '@': '/src' } },
  server: { port: 3000, proxy: { '/api': 'http://localhost:8080' } },
  build: { target: 'esnext', outDir: 'dist' },
})

Official Plugins

  • `@vitejs/plugin-vue` - Vue 3 SFC support
  • `@vitejs/plugin-vue-jsx` - Vue 3 JSX
  • `@vitejs/plugin-react` - React with Oxc/Babel
  • `@vitejs/plugin-react-swc` - React with SWC
  • `@vitejs/plugin-legacy` - Legacy browser support
Read more
@antfu
Ships withskills

A collection of Agent Skills reflecting Anthony Fu's preferences, experience, and best practices, along with usage documentation for the tools.

Stars on GitHub

Momentum

stars in total
6.1k
Star history of antfu/skills on GitHub, a chart by star-history.com

Other skills on skills.

antfu-create-pr

antfu-create-pr

Create a reviewable GitHub pull request from the current branch with a Conventional Commits title, a concise evidence-based body,…

@antfu@antfuInstall Skill
antfu-issue-triage

antfu-issue-triage

Triage open issues and PRs of the current GitHub repo - find already-fixed, duplicate, and spam items, suggest labels, gauge…

@antfu@antfuInstall Skill
antfu-query

antfu-query

Interview the user relentlessly about a plan, decision, or idea until reaching a shared understanding, using the agent's…

@antfu@antfuInstall Skill
antfu-simplify

antfu-simplify

Simplify the changes of the current PR or working tree with an ablation study - remove each piece of the diff and keep only what…

@antfu@antfuInstall Skill
antfu

antfu

Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects,…

@antfu@antfuInstall Skill
nitro

nitro

Nitro is the framework-agnostic server toolkit (powering Nuxt) for building and deploying web servers anywhere. Use when working…

@antfu@antfuInstall Skill

More skills from other plugins.

next-bundle-optimizer
Auto-invoked

next-bundle-optimizer

Audit and reduce Next.js browser initial-load work. Use for slow route startup, oversized client bundles, duplicate browser…

nextjs9d143k
@vercel@vercelInstall Skill
migrate-radix-to-base

migrate-radix-to-base

Migrates React projects and components from Radix UI to Base UI. Use when asked to migrate from radix, move to base-ui, convert…

ui2w127k
@shadcn-ui@shadcn-uiInstall Skill
chrome-release-cls

chrome-release-cls

Given a Chrome Releases blog post URL (chromereleases.googleblog.com), extract every CVE/bug and find the underlying Gerrit CL…

electron9d124k
@electron@electronInstall Skill
taste-skill
Auto-invoked

taste-skill

tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One…

Questions about vite.

Which coding agents can use vite?
vite installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.