Skip to main content
rulesSource-backedReview first Safety · Privacy

Vite Expert - CLAUDE.md Rules for Claude Code

Transform Claude into a Vite specialist with deep knowledge of dev server, build configuration, plugins, environment variables, and production bundling.

by jaso0n0818·added 2026-06-19·
HarnessClaude Code
Review first review before installing

Open the source and read safety notes before installing.

Privacy notes

  • Vite env files may contain API keys; use VITE_ prefix only for client-exposed values and keep secrets server-side.

Schema details

Install type
copy
Troubleshooting
No
Full copyable content
You are an expert Vite developer focused on fast dev feedback and lean production builds.

## Configuration

- Keep `vite.config.ts` typed with `defineConfig`; split shared options for app vs library mode
- Use `resolve.alias` sparingly; prefer package exports and tsconfig paths
- Load env via `loadEnv(mode, process.cwd())`; expose only `VITE_` vars to client code

## Dev server and HMR

- Configure `server.proxy` for local API backends instead of CORS hacks in app code
- Split large dependency pre-bundling with `optimizeDeps.include` when cold starts lag
- Fix HMR boundaries by keeping side-effect imports out of React/Vue entry modules when possible

## Plugins and build

- Prefer official or well-maintained plugins; pin versions alongside Vite major releases
- Use `build.rollupOptions.output.manualChunks` for route-level or vendor splits
- Enable `build.sourcemap` in staging only; disable production source maps unless they are uploaded to a private error-reporting service and excluded from public deploys

## Performance checks

- Inspect bundles with `rollup-plugin-visualizer` or Vite's build analyze output
- Lazy-load routes and heavy widgets; audit dynamic import paths for cache-friendly names
- Validate SSR or preview builds with `vite preview`, not only dev-server behavior

About this resource

Use these rules when building or reviewing Vite-powered frontend tooling.

Source citations

Add this badge to your README

Show that Vite Expert - CLAUDE.md Rules for Claude Code is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/rules/vite-expert.svg)](https://heyclau.de/entry/rules/vite-expert)

How it compares

Vite Expert - CLAUDE.md Rules for Claude Code side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldVite Expert - CLAUDE.md Rules for Claude Code

Transform Claude into a Vite specialist with deep knowledge of dev server, build configuration, plugins, environment variables, and production bundling.

Open dossier
Angular Expert - CLAUDE.md Rules for Claude Code

Transform Claude into an Angular specialist with deep knowledge of standalone components, Angular Signals, dependency injection, RxJS patterns, and the Angular Style Guide.

Open dossier
API First Dev Expert - CLAUDE.md Rules for Claude Code

A CLAUDE.md rule set for contract-first backend work: define OpenAPI, tRPC, and GraphQL schemas before code, generate typed clients, and enforce request and response validation.

Open dossier
Go Golang Language Expert - CLAUDE.md Rules for Claude Code

Transform Claude into a Go ecosystem expert specializing in tooling, library development, CLI applications, and Go build system mastery

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety · Privacy Safety · Privacy · Safety Privacy Safety Privacy
Categoryrulesrulesrulesrules
Sourcesource-backedsource-backedsource-backedsource-backed
Authorjaso0n0818jaso0n0818JSONboredJSONbored
Added2026-06-192026-06-132025-10-252025-09-16
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notes— missing— missingThis rule is prompt guidance, not executable code, but it directs Claude to design REST, tRPC, and GraphQL endpoints that create and modify records (for example POST and PATCH handlers); review and authorize generated write operations before deploying them. The guidance exposes public, versioned API surfaces and recommends SDK/client generation; enforce request validation and the documented middleware order so authentication runs before authorization on every generated endpoint.Recommendations may include shell commands, package installs, or file edits; review and run any suggested changes yourself instead of applying them unverified.
Privacy notesVite env files may contain API keys; use VITE_ prefix only for client-exposed values and keep secrets server-side.— missingThe recommended patterns authenticate with JWT, OAuth 2.0/OIDC, and bearer tokens; keep API keys, client secrets, and tokens in environment variables or a secrets manager and never commit them or paste them into OpenAPI examples. Generated contracts can return user records such as email, role, and identifiers; apply authorization and field-level filtering so responses do not over-expose personal data.Guides Claude to read your repository files plus any code, logs, configuration, or credentials you share in the session; nothing is transmitted beyond the model, but review what you expose before sharing.
Prerequisites— none listed— none listed— none listed— none listed
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.