vite-plus-best-practices
Installation
SKILL.md
Vite+ best practices
Use when working with Vite+ (VoidZero’s vite-plus toolchain): vp CLI, defineConfig from vite-plus, unified lint/format/check, and apps that depend on @voidzero-dev/vite-plus-core / @voidzero-dev/vite-plus-test.
Mental model
- Vite+ is the control plane for dev, build, test, lint, and format. Prefer one
vite.config.tsat the monorepo root (or the package root) over scattering duplicate tool configs unless a package truly needs an exception. vpwraps and coordinates Vite, Oxlint, ESLint plugins, TypeScript checking, Prettier-style formatting, and Vitest-style tests—treatvp checkas the source of truth for “green” in this repo.
Configuration (defineConfig)
- Put cross-cutting rules in root
defineConfig:lint(plugins,typeAware,typeCheck),fmt(ignorePatterns, import sorting, Tailwind class sorting),staged, andrun.tasksfor orchestration (e.g.concurrentlyfor web + API). - Keep app-specific Vite options (SSR, TanStack Start, Nitro) in the app’s Vite config; keep policy (what “check” means) aligned with root where possible.
fmt.ignorePatterns: exclude generated or vendor-like files (e.g. route trees, exported OpenAPI JSON) so automation doesn’t fight codegen.