vite-plus-best-practiceslisted
Install: claude install-skill Firzus/agent-skills
# Vite+ Best Practices
Apply these rules when writing or reviewing Vite+ code, configuring `vite.config.ts`, running `vp` commands, or migrating to Vite+.
Vite+ ships in two parts:
- `vp` — the global command-line tool (managed runtime + package manager)
- `vite-plus` — the local package installed in each project
All Vite+ configuration belongs in a single `vite.config.ts` using blocks (`server`, `build`, `test`, `lint`, `fmt`, `run`, `pack`, `staged`, `create`). Do **not** keep separate `vitest.config.ts`, `oxlint.config.json`, `tsdown.config.ts`, `.prettierrc`, or `lint-staged.config.*` files.
## Installation & Environment
See [getting-started.md](./getting-started.md) for:
- Installing `vp` on macOS/Linux (`curl -fsSL https://vite.plus | bash`) and Windows (`irm https://vite.plus/ps1 | iex`)
- CI install via `setup-vp` GitHub Action
- `vp env on` (managed) vs `vp env off` (system-first)
- Pinning Node.js per project with `.node-version` and `vp env pin lts`
- `VP_HOME` and `VP_NODE_DIST_MIRROR` for corporate mirrors
## Command Surface
See [commands.md](./commands.md) for:
- Built-in commands (`vp dev`, `vp build`, `vp preview`, `vp check`, `vp test`, `vp pack`) — these always run the built-in tool, never a same-named `package.json` script
- `vp run <script>` (and the `vpr` shorthand) to execute `package.json` scripts
- Why `vp build` ≠ `vp run build` and `vp test` ≠ `vp run test`
- `vp` with no args opens the interactive picker
## Scaffolding & Migration
See [scaf