Vite Orchestrator
When to use this skill
- •Use when initializing the frontend or when a repo lacks a Vite + TS config.
- •Triggered by prompts mentioning Vite, vite.config, tsconfig paths, or Tailwind wiring.
Instructions
- •
First Step: Verify project root and package.json exist. If not present, suggest
npm create vite@latest -- --template react-ts. - •
Second Step: Create/update
tsconfig.jsonwithbaseUrlandpaths(@/*→src/*). Provide atsconfig.jsonsnippet and ensure the TypeScript server is restarted. - •
Third Step: Create
vite.config.tsusing@vitejs/plugin-reactandvite-tsconfig-pathsand configure CSS handling (PostCSS/Tailwind if requested). - •
Fourth Step: Add recommended npm scripts to
package.json(dev,build,preview,lint,test,format) and list required dependencies to install.
Examples
- •"generate vite.config.ts with tsconfig aliases"
- •Commands:
npm i -D vite @vitejs/plugin-react vite-tsconfig-pathsandnpm i -D tailwindcss postcss autoprefixer(if Tailwind enabled)
Additional Resources
- •Vite: https://vitejs.dev
- •vite-tsconfig-paths: https://github.com/aleclarson/vite-tsconfig-paths
Notes
- •Recommend using
vite-tsconfig-pathsto avoid duplicating aliases in Vite config. - •If running in CI, show how to set
VITE_env vars during build.