vite-v8
БесплатноБез исполняемых скриптовНе проверенVite 8+ development with Rolldown and Oxc. Use when configuring vite.config.ts, migrating rollup/esbuild-era configs, authoring Vite plugins with environments…
от nodnarbnitram★ 19 звёзд на GitHubОб этом скилле
Vite 8 Skill
Configure, migrate, and debug Vite 8 projects with the repo's preferred Vite-native patterns.
Before You Start
This skill focuses on the Vite 8 architecture shift, not generic bundler advice.
| Metric | Without Skill | With Skill |
|---|---|---|
| Migration Time | ~120 min | ~40 min |
| Common Config Errors | 6+ | 0 |
| Token Usage | High (trial/error) | Low (known patterns) |
Known Issues This Skill Prevents
- Broken builds from leaving
rollupOptionsin Vite 8 configs whererolldownOptionsis needed - Outdated JS/TS transform setup from using
esbuildinstead ofoxc - Plugin code checking stale
ssrbooleans instead of environment-aware APIs - HMR bugs from using deprecated
handleHotUpdatepatterns instead ofhotUpdate - SSR/runtime confusion from older
ssrLoadModulemental models instead of Module Runner - Performance regressions from missing hook filters in Rust↔JS plugin boundaries
- Slow startup and request waterfalls from barrel files, missing warmup, or loose import resolution
Quick Start
Step 1: Start with a typed Vite 8 config
// vite.config.ts
import { defineConfig } from 'vite';
export default defineConfig({
server: {
port: 5173,
},
build: {
target: 'baseline-widely-available',
rolldownOptions: {
output: {
manualChunks: undefined,
},
},
},
});
Why this matters: Vite 8 is built around Rolldown/Oxc-era config and defaults. Starting from defineConfig with Vite 8 options avoids backporting old Rollup/esbuild assumptions into a new architecture.
Step 2: Prefer Vite 8 terminology in plugins and SSR code
import type { Plugin } from 'vite';
export function inspectEnvironment(): Plugin {
return {
name: 'inspect-environment',
configEnvironment(name) {
if (name === 'ssr') {
return {
resolve: {
conditions: ['node'],
},
};
}
},
};
}
Why this matters: Vite 8 leans on named environments and environment-aware plugin behavior. That is a better fit than older client-vs-SSR shortcuts.
Step 3: Use the correct one-shot commands
vite dev
vite build
vite build --ssr src/entry-server.ts
vite preview
Why this matters: These are the stable command surfaces agents and CI flows should target. Avoid inventing framework-specific abstractions unless the project already uses them.
Critical Rules
Always Do
- Use
vite.config.tswithdefineConfigfor repo-facing Vite 8 work - Prefer
build.rolldownOptionsover legacybuild.rollupOptions - Prefer
oxcoveresbuildfor new Vite 8 transform configuration - Use named environments when plugin or SSR behavior differs by runtime
- Use hook filters when writing performance-sensitive
transformorresolveIdplugins - Reach for Module Runner concepts when debugging modern SSR/runtime execution
- Use explicit file extensions and review barrel files when performance work matters
- Keep Vite plugin code ESM-first
Never Do
- Never introduce new
rollupOptions/esbuildexamples as the preferred Vite 8 path - Never treat
handleHotUpdateas the forward-looking HMR hook in Vite 8 - Never assume a single client/SSR split is enough for all runtimes
- Never suggest CommonJS config as the default for new Vite work
- Never skip
ssr.noExternalreview when SSR dependencies misbehave
Common Mistakes
Wrong - legacy build config:
export default defineConfig({
build: {
rollupOptions: {
external: ['react'],
},
},
esbuild: {
jsxInject: "import React from 'react'",
},
});
Correct - Vite 8 config:
export default defineConfig({
build: {
rolldownOptions: {
external: ['react'],
},
},
oxc: {
jsxInject: "import React from 'react'",
},
});
Why: Vite 8 moved its preferred build and transform configuration surface to Rolldown and Oxc.
Wrong - stale HMR hook:
export default function plugin() {
return {
name: 'old-hmr',
handleHotUpdate(ctx) {
return ctx.modules;
},
};
}
Correct - environment-aware HMR:
export default function plugin() {
return {
name: 'env-hmr',
hotUpdate(ctx) {
return ctx.modules;
},
};
}
Why: hotUpdate is the environment-aware Vite 8 direction, while handleHotUpdate is legacy-oriented.
Known Issues Prevention
| Issue | Root Cause | Solution |
|---|---|---|
| Config migration stalls | Old Rollup/esbuild settings copied forward | Migrate to rolldownOptions and oxc |
| Plugin logic breaks in non-standard runtimes | Plugin assumes only client/SSR | Use named environments and this.environment |
| HMR customization feels brittle | Legacy HMR hook carried forward | Prefer hotUpdate and environment-aware flows |
| SSR dependency crashes | Externalization ass |
Установить vite-v8 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл vite-v8?
Vite 8+ development with Rolldown and Oxc. Use when configuring vite.config.ts, migrating rollup/esbuild-era configs, authoring Vite plugins with environments and hook filters, or troubleshooting SSR, Module Runner, and production build behavior in Vite 8. Triggers on vite, vite.config.ts, rolldownOptions, oxc, module runner, environments, hotUpdate, and lightning css.
Как установить скилл vite-v8?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл vite-v8 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic