本文へ移動
cccskills
無料GitHub で公開

vite

Assists with configuring and using Vite as a frontend build tool for modern web applications. Use when setting up dev servers, optimizing production builds, configuring plugins, migrating from Webpack or CRA, or building component libraries. Trigger words: vite, build tool, HMR, hot module replacement, vite config, rollup, bundling.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Vite

Overview

Vite is a next-generation frontend build tool providing instant dev server startup via native ES modules and optimized Rollup-based production builds. It supports React, Vue, Svelte, and vanilla TypeScript projects with advanced bundling strategies, plugin extensibility, and library mode.

Instructions

  • When setting up a project, create vite.config.ts with the appropriate framework plugin (@vitejs/plugin-react, @vitejs/plugin-vue), configure resolve.alias with @ mapping to src/, and set environment variables with VITE_ prefix.
  • When configuring the dev server, set up API proxying with server.proxy, enable HTTPS with @vitejs/plugin-basic-ssl, and use server.watch polling for containers or VMs.
  • When optimizing builds, configure manual chunks with build.rollupOptions.output.manualChunks for vendor splitting, enable CSS code splitting, and set build.target for browser compatibility.
  • When creating plugins, use the Rollup-compatible plugin API with resolveId, load, and transform hooks, and leverage virtual modules with the virtual: prefix.
  • When building libraries, configure build.lib with entry point and output formats (es, cjs, umd), externalize peer dependencies, and use vite-plugin-dts for TypeScript declaration generation.
  • When migrating from Webpack, replace webpack.config.js with vite.config.ts, swap loaders for Vite plugins, and update REACT_APP_* env vars to VITE_*.
  • When integrating testing, use Vitest which shares Vite config and provides instant HMR for tests.

Examples

Example 1: Migrate a Create React App project to Vite

User request: "Convert my CRA project to use Vite instead"

Actions:

  1. Install Vite and @vitejs/plugin-react, remove react-scripts
  2. Create vite.config.ts with React plugin and path aliases
  3. Rename REACT_APP_* environment variables to VITE_*
  4. Update index.html to reference the entry module directly

Output: A Vite-powered React project with faster dev startup and HMR.

Example 2: Configure optimized production build

User request: "Set up Vite build with vendor chunk splitting and source maps for Sentry"

Actions:

  1. Configure build.rollupOptions.output.manualChunks to separate vendor libraries
  2. Enable build.sourcemap for error monitoring integration
  3. Set build.target appropriate to browser support requirements
  4. Add build.assetsInlineLimit tuning for small asset optimization

Output: An optimized production build configuration with proper chunk splitting and debugging support.

Guidelines

  • Always use import.meta.env.VITE_* for client-exposed env vars, never process.env.
  • Configure resolve.alias with @ prefix mapping to src/ for clean imports.
  • Split vendor chunks manually when default chunking produces too many small files.
  • Use build.target: "esnext" for modern-only apps, @vitejs/plugin-legacy for legacy browser support.
  • Enable build.sourcemap in production for error monitoring tools.
  • Keep vite.config.ts clean by extracting complex plugin configs into separate files.
  • Use optimizeDeps.include to pre-bundle problematic dependencies that break during dev.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Audit web pages and components for WCAG 2.2 accessibility compliance. Use when a user asks to check accessibility, find a11y issues, audit for WCAG compliance, fix screen reader problems, check color contrast, ensure keyboard navigation works, or prepare for accessibility regulations like the European Accessibility Act or ADA.

日本語の概要は準備中です。原文の説明を表示しています。

jaem1n207/synchronize-tab-scrolling192026年10月9日 更新

Perform thorough code reviews with actionable, prioritized feedback. Use when a user asks to review code, check code quality, find bugs, review a pull request, audit code for issues, or get feedback on implementation. Covers correctness, security, performance, readability, and best practices across languages.

日本語の概要は準備中です。原文の説明を表示しています。

jaem1n207/synchronize-tab-scrolling192026年10月9日 更新

eslint

無料

ESLint is the standard linting tool for JavaScript and TypeScript projects. It statically analyzes your code to find problems, enforce coding conventions, and catch bugs before they reach production. ESLint 9 introduced the flat config format, replacing the legacy `.eslintrc` system with a simpler, more composable `eslint.config.js` file. With a rich plugin ecosystem covering React, TypeScript, accessibility, and import ordering, ESLint is the backbone of code quality in modern web development.

日本語の概要は準備中です。原文の説明を表示しています。

jaem1n207/synchronize-tab-scrolling192026年10月9日 更新

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.

日本語の概要は準備中です。原文の説明を表示しています。

jaem1n207/synchronize-tab-scrolling192026年10月9日 更新

github

無料

GitHub patterns using gh CLI for pull requests, stacked PRs, code review, branching strategies, and repository automation. Use when working with GitHub PRs, merging strategies, or repository management tasks.

日本語の概要は準備中です。原文の説明を表示しています。

jaem1n207/synchronize-tab-scrolling192026年10月9日 更新

GitHub Actions workflow patterns for React Native iOS simulator and Android emulator cloud builds with downloadable artifacts. Use when setting up CI build pipelines or downloading GitHub Actions artifacts via gh CLI and GitHub API.

日本語の概要は準備中です。原文の説明を表示しています。

jaem1n207/synchronize-tab-scrolling192026年10月9日 更新

jaem1n207 のスキルをすべて見る

このスキルの問題を報告する