Preparing for system design interviews?  Try bugzed.com →

vite-plugin-require-transform

JSON →
library 1.0.21 ·javascript
verified Jun 18, 2026

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.

total hits 15
actors 4 distinct systems
last hit 25d ago AhrefsBot
GPTBot
4
ClaudeBot
3
Script
1
Humans
4

top countries 🇺🇸 United States · VN · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany