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.
Security Assessment
Detected risks:
About vite
Configuration and advanced usage of the Vite frontend build tool are the subject of this skill, oriented to Vite 8 beta, which is Rolldown-powered and uses the Oxc transformer. Vite itself is a next-generation build tool offering a fast dev server built on native ESM and HMR alongside optimized production builds. The stated preferences are to use TypeScript with a vite.config.ts and to always use ESM rather than CommonJS.
The material is organized into layered reference topics. Core covers configuration (vite.config.ts, defineConfig, conditional configs, loadEnv), features (import.meta.glob, asset queries like ?raw and ?url, import.meta.env, and the HMR API), and the plugin API (Vite-specific hooks, virtual modules, and plugin ordering). Build and SSR covers library mode, SSR middleware mode, ssrLoadModule, and the JavaScript API. Advanced topics include the Environment API for Vite 6+ multi-environment support and custom runtimes, and a Rolldown Migration guide describing the Vite 8 shift to the Rolldown bundler and Oxc transformer along with config migration. Each topic points to a dedicated reference file for detail.
A quick reference lists the CLI commands - vite to start the dev server, vite build for a production build, vite preview to preview it, and vite build --ssr for an SSR build - and a common config example showing plugins, resolve aliases, a dev server with port and proxy, and a build target and output directory. It enumerates the official plugins: @vitejs/plugin-vue for Vue 3 single-file components, @vitejs/plugin-vue-jsx for Vue 3 JSX, @vitejs/plugin-react using Oxc or Babel, @vitejs/plugin-react-swc using SWC, and @vitejs/plugin-legacy for legacy browser support. Cross-skill references point to vitest for Vite-native testing, vue for component patterns, and tsdown for bundling TypeScript libraries.
FAQ
Which Vite version does this target?
Vite 8 beta, which is Rolldown-powered and uses the Oxc transformer, including a migration guide for the shift from earlier versions.
What config conventions are recommended?
Use TypeScript with a vite.config.ts and always use ESM rather than CommonJS.
What are the main CLI commands?
vite starts the dev server, vite build creates a production build, vite preview previews that build, and vite build --ssr produces an SSR build.
Which official plugins are covered?
plugin-vue, plugin-vue-jsx, plugin-react (Oxc or Babel), plugin-react-swc (SWC), and plugin-legacy for legacy browser support.
Does it cover SSR and libraries?
Yes. The Build and SSR topic covers library mode, SSR middleware mode, ssrLoadModule, and the JavaScript API.
Install vite
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
onmax/nuxt-skills