vite-plugin-require-transform
JSON →A Vite plugin that converts CommonJS require() calls to ES module import syntax at build time, enabling codebases that use require() to work with Vite's ESM-native dev server. Current stable version: 1.0.21. Released as needed, with occasional minor updates. Key differentiators: supports complex cases like ternary expressions, method calls on require results, and custom import path handlers; does not require source code changes; filters by file regex (default .ts/.tsx) to avoid unnecessary transformations. Alternatives like @originjs/vite-plugin-commonjs or vite-plugin-commonjs-externals may handle broader CJS interop, but this plugin is minimal and focused specifically on require → import.
Traffic · last 30 days ↓67% vs prev 7d
total hits 11
actors 3 distinct systems
last hit 6d ago human
top countries 🇺🇸 United States · 🇨🇦 Canada · PH