Handle Vite config, plugins, optimization, SSR, and project setup issues.
Copy the install command and let the AI configure it · recommended for beginners
Please install the "vite-patterns" skill from askskill: 1. Download https://raw.githubusercontent.com/affaan-m/ECC/main/skills/vite-patterns/SKILL.md 2. Save it as ~/.claude/skills/vite-patterns/SKILL.md 3. Reload skills and tell me it's ready
Please review this vite.config.ts, identify configuration issues that may cause dev server startup failures or build errors, and provide fixes with a corrected example.
A list of config issues, root-cause analysis, and a corrected configuration example ready to use.
Help me build a Vite plugin that scans Markdown files in a target directory during build, extracts headings, generates a JSON manifest, and explains why each plugin hook is used.
Complete plugin code, explanations of key hooks, and instructions for integrating it into a project.
My Vite project starts slowly on first run and the production bundle is too large. Based on the dependency setup, suggest improvements for optimizeDeps, manualChunks, compression, and asset splitting.
A performance optimization plan with configuration suggestions, use cases, and expected benefits.
Build tool and dev server patterns for Vite 8+ projects. Covers configuration, environment variables, proxy setup, library mode, dependency pre-bundling, and common production pitfalls.
vite.config.ts or vite.config.js.env filesbuild.libnode_modules/.vite, so subsequent starts skip the work.VITE_-prefixed vars become public constants in the bundle; everything unprefixed is invisible to client code.// vite.config.ts
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
resolve: {
alias: { '@': new URL('./src', import.meta.url).pathname },
},
})
// vite.config.ts
import { defineConfig, loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd()) // VITE_ prefixed only (safe)
return {
plugins: [react()],
server: command === 'serve' ? { port: 3000 } : undefined,
define: {
__API_URL__: JSON.stringify(env.VITE_API_URL),
},
}
})
| Key | Default | Description |
|---|---|---|
root | '.' | Project root (where index.html lives) |
base | '/' | Public base path for deployed assets |
envPrefix | 'VITE_' | Prefix for client-exposed env vars |
build.outDir | 'dist' | Output directory |
build.minify | 'oxc' | Minifier ('oxc', 'terser', or false) |
build.sourcemap | false | true, 'inline', or 'hidden' |
Most plugin needs are covered by a handful of well-maintained packages. Reach for these before writing your own.
| Plugin | Purpose | When to use |
|---|---|---|
@vitejs/plugin-react-swc | React HMR + Fast Refresh via SWC | Default for React apps (faster than Babel variant) |
@vitejs/plugin-react | React HMR + Fast Refresh via Babel | Only if you need Babel plugins (emotion, MobX decorators) |
@vitejs/plugin-vue | Vue 3 SFC support | Vue apps |
vite-plugin-checker | Runs tsc + ESLint in worker thread with HMR overlay | Any TypeScript app — Vite does NOT type-check during vite build |
vite-tsconfig-paths | Honors tsconfig.json paths aliases | Any time you already have aliases in tsconfig.json |
vite-plugin-dts | Emits .d.ts files in library mode | Publishing TypeScript libraries |
vite-plugin-svgr | Imports SVGs as React components | React apps using SVGs as components |
rollup-plugin-visualizer | Bundle treemap/sunburst report | Periodic bundle size audits (use enforce: 'post') |
vite-plugin-pwa | Zero-config PWA + Workbox | Offline-capable apps |
…
Create reusable Manim animated explainers for technical concepts, graphs, and system flows.
Build robust Python test suites with pytest, TDD, mocking, and coverage.
Learn Rust testing patterns and TDD to improve code quality and reliability.
Troubleshoot BGP sessions, routing policy issues, and collect safe diagnostic evidence.
Run a pre-release verification loop for Quarkus builds, tests, scans, and reviews.
Research prediction market signals for products, dashboards, agents, and decision intelligence.
Build HTTP service patterns with lifecycle hooks, WebSockets, SSE, and proxying.
Apply Nuxt 4 patterns for SSR safety, performance, and data fetching.
Learn frontend patterns for React, Next.js, state, performance, and UI best practices.
Design CLI tools with simple installs, command routing, and layered config.
Learn idiomatic Rust patterns, ownership, concurrency, and robust error handling practices.
Learn practical Kotlin Ktor server patterns for building and testing backend apps.