New advertisers: 50% off your first month with code FIRSTMONTHSee slots
asyrafhussin avatar

React Vite Best Practices

Curated performance rules for React and Vite covering build tuning, code splitting, dev startup, and asset handling.

skills.sh installs
3K
GitHub stars
105
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers 23 rules across six categories: build optimization, code splitting, development, asset handling, environment config, and bundle analysis
  • Includes a recommended vite.config.ts with manual vendor chunks, modern browser targets, and an optimizeDeps setup
  • Provides route-based React.lazy() splitting with Suspense boundaries and typed VITE_ environment variables
  • Designed for teams reviewing or optimizing React components built with Vite and tracking bundle size

Install

$ npx -y skills add asyrafhussin/agent-skills --skill react-vite-best-practices -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

React + Vite Best Practices

Comprehensive performance optimization guide for React applications built with Vite. Contains 23 rules across 6 categories for build optimization, code splitting, development performance, asset handling, environment configuration, and bundle analysis.

Metadata

  • Version: 2.0.0
  • Framework: React + Vite
  • Rule Count: 23 rules across 6 categories
  • License: MIT

When to Apply

Reference these guidelines when:

  • Configuring Vite for React projects
  • Implementing code splitting and lazy loading
  • Optimizing build output and bundle size
  • Setting up development environment and HMR
  • Handling images, fonts, SVGs, and static assets
  • Managing environment variables across environments
  • Analyzing bundle size and dependencies

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Build OptimizationCRITICALbuild-
2Code SplittingCRITICALsplit-
3DevelopmentHIGHdev-
4Asset HandlingHIGHasset-
5Environment ConfigMEDIUMenv-
6Bundle AnalysisMEDIUMbundle-

Quick Reference

Details

Repository
github.com/asyrafhussin/agent-skills
Categories
Frontend & UI Code, Code Review & Quality

More from asyrafhussin/agent-skills

All 14

Similar to React Vite Best Practices

More Frontend & UI Code