Vite Patterns
Vite build tool patterns covering config, plugins, HMR, env variables, proxy, SSR, and library mode.
- CCM score
- 73 of 100
- skills.sh installs
- 9.2K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers config structure, plugin selection, HMR API usage, environment variables, dev proxy, SSR, library mode, and pre-bundling
- Includes a table of key config options (
root,base,envPrefix,build.minify,build.sourcemap) and a list of essential plugins - Enforces the rule that only public values belong in
VITE_variables, because those are inlined into the client bundle at build time - Designed for projects using
vite.config.tsthat need type checking alongsidevite build, since Vite does not type-check during builds
Install
$ npx -y skills add affaan-m/ecc --skill vite-patterns -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Vite Patterns
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.
When to Use
- Configuring
vite.config.tsorvite.config.js - Setting up environment variables or
.envfiles - Configuring dev server proxy for API backends
- Optimizing build output (chunks, minification, assets)
- Publishing libraries with
build.lib - Troubleshooting dependency pre-bundling or CJS/ESM interop
- Debugging HMR, dev server, or build errors
- Choosing or ordering Vite plugins
How It Works
Details
- Repository
- github.com/affaan-m/ecc
- Category
- Frontend & UI Code
- First seen
- Jul 14, 2026
Questions
What does the vite-patterns skill help with?
The vite-patterns skill covers Vite build tool patterns, including vite.config.ts setup, plugins, HMR, environment variables, dev server proxy, SSR, library mode, dependency pre-bundling and build optimization. It activates when you work with vite.config.ts, Vite plugins or Vite-based projects. The SKILL.md targets Vite 8 and later projects.
How do I install the vite-patterns skill?
Run npx -y skills add affaan-m/ecc --skill vite-patterns -y in your project to install it. After that, the agent can apply Vite config, plugin and environment variable guidance when you edit vite.config.ts or other Vite files.
Which Vite topics does vite-patterns cover in detail?
The skill includes config structure with defineConfig and loadEnv, a table of key config options, and guidance on choosing essential plugins such as React SWC, vite-plugin-checker and vite-tsconfig-paths. It also explains how to write a minimal custom plugin and how import.meta.hot handles HMR state. Environment variables are covered, with the rule that only VITE_-prefixed values reach client code.
Is the VITE_ prefix safe for storing secrets with vite-patterns?
No, the skill warns that any VITE_-prefixed variable is statically inlined into the client bundle at build time and can be extracted from shipped JavaScript. Secrets such as API tokens and private keys should stay server-side behind an API or serverless function. Only public values like API URLs and feature flags belong in VITE_ variables.
More from affaan-m/ecc
All 257- Agent Architecture Audit9.1K
- Error Handling9.1K
- Windows Desktop E2e9.1K
- Redis Patterns9.1K
- Mysql Patterns9.1K
- Production Audit9K
- Make Interfaces Feel Better9K
- Motion Patterns9K
- Motion Foundations9K
- Motion Advanced8.9K
- Ecc Guide8.9K
- Mle Workflow8.9K
- Django Celery8.8K
- Homelab Network Setup8.8K
- Ios Icon Gen8.8K
- Agentic Os8.8K
- Skill Stocktake8.8K
- Ui To Vue8.8K
- Network Interface Health8.7K
- Homelab Wireguard Vpn8.7K
- Netmiko Ssh Automation8.7K
- Homelab Network Readiness8.7K
- Cisco Ios Patterns8.7K
- Plan Orchestrate8.7K
Similar to Vite Patterns
More Frontend & UI Codeviteantfu/skills42.8K installsComprehensive Vite reference covering configuration, plugin API, SSR, library builds, and the Vite 8 Rolldown migration.
vite-advancedyonatangross/orchestkit225 installsAdvanced Vite 8 patterns for Rolldown builds, advancedChunks, Environment API, plugins, and SSR configuration.
react-vite-best-practicesasyrafhussin/agent-skills3K installsCurated performance rules for React and Vite covering build tuning, code splitting, dev startup, and asset handling.
hot-reload-optimizerpatricio0312rev/skills268 installsConfig-driven HMR and dev-server tuning for Vite, Next.js, and webpack projects, covering dependency pre-bundling and caching.
vite-bundle-optimizationpatternsdev/skills699 installsVite bundle optimization patterns for barrel imports, chunk splitting, lazy loading, and deferred scripts.