vite-expert_skill

This skill optimizes Vite builds and dev experience by applying modern ESM-first patterns, HMR tuning, and selective plugin strategies.
  • TypeScript

60

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill cin12211/orca-q --skill vite-expert

  • SKILL.md24.3 KB

Overview

This skill is a Vite build optimization expert focused on ESM-first development, HMR tuning, plugin design, production builds, library mode, and SSR configuration. Use it proactively for dev server slowness, build bloat, plugin problems, module resolution, or any Vite bundling issue. If a different specialized expert is a better fit, I will recommend switching and stop.

How this skill works

I first inspect the project setup (vite configs, package.json, plugins, and environment) using fast file and code searches. I classify the issue into categories (pre-bundling, HMR, bundle size, module resolution, plugin bugs, SSR) and apply targeted fixes, configuration tweaks, or plugin changes. I validate changes with one-shot builds and bundle analysis commands to avoid running persistent dev servers.

When to use it

  • Dev server starts slowly or shows repeated "optimizing dependencies" messages
  • Hot Module Replacement is failing, slow, or causing full page reloads
  • Production build output is too large or contains unexpected bundles
  • Library mode or SSR build configuration needs correct outputs and externals
  • Custom Vite plugin development, lifecycle hooks, or environment injection
  • Module resolution errors or alias/path issues across platforms

Best practices

  • Prefer ESM-first targets and esbuild minification for faster builds
  • Use optimizeDeps.include/exclude to fix pre-bundling hotspots
  • Add import.meta.hot handlers and warmup frequently used files for HMR
  • Apply manualChunks and dynamic imports to split vendor and app code
  • Validate with single-run builds and bundle analyzers; avoid dev server validation
  • Externalize large or legacy dependencies for library and SSR builds

Example use cases

  • Diagnose slow dev server startup and reduce repeated dependency optimization
  • Fix HMR that triggers full page reloads by adding accept handlers or resolving circular imports
  • Shrink production bundles by introducing manualChunks and moving heavy libs to CDN
  • Configure library mode with preserveModules and correct externals/globals
  • Create a Vite plugin that injects build metadata, middleware, and emits a manifest

FAQ

Clear node_modules/.vite and restart dev if optimizeDeps repeatedly re-runs or after changing dependency types (CJS/ESM).

How do I decide between optimizeDeps.include and exclude?

Include packages that break pre-bundling or are ESM-only but slow to detect; exclude very large or workspace packages you want to load normally.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational