Communitygithub.com

ComeOnOliver/skillshub

Vite 构建工具配置、插件 API、SSR 以及 Vite 8 Rolldown 迁移。用于处理 Vite 项目、vite.config.ts、Vite 插件或使用 Vite 构建库/SSR 应用。

skillshub 是什么?

该技能为 AI 助手(如 Claude Code、Cursor、Codex 等)提供了全面的 Vite 构建工具知识,涵盖配置、插件 API、服务端渲染 (SSR) 以及 Vite 8 中基于 Rolldown 的迁移。它基于 Vite 8 beta 版本(由 Rolldown 打包器和 Oxc 转换器驱动),强调使用 TypeScript、ESM 和 `vite.config.ts`。技能以结构化表格组织核心、构建/SSR 和高级主题,并附有快速参考:CLI 命令、常见配置示例和官方插件列表(支持 Vue、React 等)。开发者可通过此技能快速查询 Vite 特性、环境 API 和迁移指南,从而高效配置和优化现代前端项目。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/antfu/skills/vite

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Vite

基于 Vite 8 beta(由 Rolldown 驱动)。Vite 8 使用 Rolldown 打包器和 Oxc 转换器。

Vite 是下一代前端构建工具,提供快速的开发服务器(原生 ESM + HMR)和优化后的生产构建。

偏好设置

  • 使用 TypeScript:优先选择 vite.config.ts
  • 始终使用 ESM,避免 CommonJS

核心

主题描述参考文档
配置vite.config.ts、defineConfig、条件配置、loadEnvcore-config
特性import.meta.glob、资源查询(?raw、?url)、import.meta.env、HMR APIcore-features
插件 APIVite 特有钩子、虚拟模块、插件排序core-plugin-api

构建与 SSR

主题描述参考文档
构建与 SSR库模式、SSR 中间件模式、ssrLoadModule、JavaScript APIbuild-and-ssr

高级

主题描述参考文档
环境 APIVite 6+ 多环境支持、自定义运行时environment-api
Rolldown 迁移Vite 8 变化:Rolldown 打包器、Oxc 转换器、配置迁移rolldown-migration

快速参考

CLI 命令

vite              # 启动开发服务器
vite build        # 生产构建
vite preview      # 预览生产构建
vite build --ssr  # SSR 构建

常见配置

import { defineConfig } from 'vite'

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

官方插件

  • @vitejs/plugin-vue - Vue 3 SFC 支持
  • @vitejs/plugin-vue-jsx - Vue 3 JSX
  • @vitejs/plugin-react - React 与 Oxc/Babel
  • @vitejs/plugin-react-swc - React 与 SWC
  • @vitejs/plugin-legacy - 旧版浏览器支持

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相关技能