vite-plugin-require
JSON →A Vite plugin that enables CommonJS require() syntax in Vite projects, converting require calls to ESM imports or import.meta.url references. Version 1.2.17 is the latest stable release, supporting Vite 2 through 6. It uses a regex-based transform to replace require() calls, with options to control file scope and conversion mode. Different from alternatives like @originjs/vite-plugin-commonjs, this plugin focuses specifically on require() transforms for asset and module references. It ships TypeScript types but has a limited API surface. Last updated in 2024, the plugin has moderate community adoption and is maintained for compatibility with newer Vite versions.
Traffic · last 30 days ↑0% vs prev 7d
total hits 11
actors 3 distinct systems
last hit 6d ago human
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇸🇬 Singapore
Resources
API endpoints
full doc /v1/registry/vite-plugin-require