.agents/skills/vite/SKILL.md
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.
npx skillsauth add jaem1n207/synchronize-tab-scrolling viteInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
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.server.proxy, enable HTTPS with @vitejs/plugin-basic-ssl, and use server.watch polling for containers or VMs.build.rollupOptions.output.manualChunks for vendor splitting, enable CSS code splitting, and set build.target for browser compatibility.resolveId, load, and transform hooks, and leverage virtual modules with the virtual: prefix.build.lib with entry point and output formats (es, cjs, umd), externalize peer dependencies, and use vite-plugin-dts for TypeScript declaration generation.webpack.config.js with vite.config.ts, swap loaders for Vite plugins, and update REACT_APP_* env vars to VITE_*.User request: "Convert my CRA project to use Vite instead"
Actions:
@vitejs/plugin-react, remove react-scriptsvite.config.ts with React plugin and path aliasesREACT_APP_* environment variables to VITE_*index.html to reference the entry module directlyOutput: A Vite-powered React project with faster dev startup and HMR.
User request: "Set up Vite build with vendor chunk splitting and source maps for Sentry"
Actions:
build.rollupOptions.output.manualChunks to separate vendor librariesbuild.sourcemap for error monitoring integrationbuild.target appropriate to browser support requirementsbuild.assetsInlineLimit tuning for small asset optimizationOutput: An optimized production build configuration with proper chunk splitting and debugging support.
import.meta.env.VITE_* for client-exposed env vars, never process.env.resolve.alias with @ prefix mapping to src/ for clean imports.build.target: "esnext" for modern-only apps, @vitejs/plugin-legacy for legacy browser support.build.sourcemap in production for error monitoring tools.vite.config.ts clean by extracting complex plugin configs into separate files.optimizeDeps.include to pre-bundle problematic dependencies that break during dev.tools
Build cross-browser extensions with WXT — the modern framework for Chrome, Firefox, Safari, and Edge extensions. Use when someone asks to "build a browser extension", "Chrome extension with React", "WXT framework", "cross- browser extension", "manifest v3 extension", "build Firefox extension", or "browser extension with TypeScript". Covers content scripts, background workers, popup/options pages, storage, messaging, and publishing.
tools
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
testing
Assists with unit and integration testing using Vitest, a Vite-native test runner. Use when writing tests, configuring mocks, setting up coverage, or migrating from Jest. Trigger words: vitest, unit testing, test runner, vi.fn, vi.mock, test coverage, jest replacement.