Vite Plugin React Control Statements
JSON →A Vite plugin (v1.0.2) that transforms `<If>`, `<Choose>`, `<When>`, and `<Otherwise>` JSX components into native JavaScript ternary/conditional expressions at build time, avoiding runtime overhead. Inspired by jsx-control-statements and Svelte logic blocks. Provides type definitions via `vite-plugin-react-control-statements` and optional global types via `@types/vite-plugin-react-control-statements`. Uses regex-based transformation, which is imperfect for complex nested cases. Compatible with React, Vue, and any JSX/TSX setup in Vite. Active development with no recent updates; known issues with regex parsing.
Traffic · last 30 days stale · no recent hits
total hits 7
actors 2 distinct systems
last hit 17d ago AhrefsBot
top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇬🇧 United Kingdom