vite

Configure Vite build tooling, plugins, SSR, and Rolldown migration for frontend projects.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/zomeru/zomlab --skill vite-zomeru
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: vite
Source: https://github.com/zomeru/zomlab/tree/main/.agents/skills/vite
Command: npx skills add https://github.com/zomeru/zomlab --skill vite-zomeru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Frontend developers working with Vite often struggle to recall the correct configuration patterns, plugin APIs, and migration steps across Vite versions, especially with the Vite 8 shift to Rolldown and Oxc. This Skill provides structured, version-accurate guidance for configuring and extending Vite projects. ## Core Features & Use Cases - Configuration Guidance: Covers vite.config.ts, defineConfig, conditional and async configs, loadEnv, aliases, proxies, and build targets. - Plugin Authoring: Documents Vite-specific hooks like configResolved, configureServer, transformIndexHtml, virtual modules, and plugin ordering with enforce. - Build, SSR & Migration: Explains library mode, multi-page apps, the JavaScript API, the Vite 6+ Environment API, and the Vite 8 Rolldown/Oxc migration path. - Use Case: When upgrading a project from Vite 7 to Vite 8, use this Skill to convert rollupOptions to rolldownOptions and esbuild options to oxc configuration correctly. ## Quick Start Use the vite skill to help me migrate my vite.config.ts from Vite 7 rollupOptions to the Vite 8 Rolldown configuration.

Frequently Asked Questions about vite

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure path aliases in vite.config.ts?▼

Use the resolve.alias option in vite.config.ts to map shortcuts like '@' to '/src'. Define the config with defineConfig from Vite, and prefer TypeScript with ESM syntax for the configuration file.

How to migrate from Vite 7 to Vite 8 Rolldown?▼

Rename rollupOptions to rolldownOptions and replace the esbuild option with the oxc option in your config. For large projects, test first with the rolldown-vite package, then upgrade to vite@8 once stable.

Does Vite support environment variables in the config file?▼

Vite loads .env files after config resolution, so use the loadEnv function inside defineConfig to access them. Only variables prefixed with VITE_ are exposed to client code via import.meta.env.

How do I create a virtual module in a Vite plugin?▼

Implement resolveId and load hooks in your plugin, using a 'virtual:' prefix for the user-facing path and a '\0' prefix for the resolved id. The load hook returns the module content as a string without any file on disk.

Should I use Vite's SSR API directly for my app?▼

Vite's SSR support is low-level and intended for meta-framework authors, not application developers. Use a Vite-based framework like Nuxt, SvelteKit, SolidStart, or TanStack Start, which build on Vite's SSR primitives.

Are Rollup plugins compatible with Vite 8 Rolldown?▼

Most Vite plugins work unchanged because Rolldown supports Rollup's plugin API. If a plugin only works during build, wrap it with enforce: 'post' and apply: 'build' to restrict it to production builds.