rollup-plugin-commonjs-alternate
JSON →A Rollup plugin that converts CommonJS modules to ES modules, designed as an alternative to @rollup/plugin-commonjs. Version 0.8.0 is the latest. It improves on the official plugin by supporting conditional requires (only including the correct branch), detecting require calls in ESM files (e.g., for React Hot Loader), and not stubbing dynamic requires (essential for HMR). It is useful for front-end libraries with best-practice module patterns, but may not work with libraries that reassign module.exports. Named exports require explicit configuration. Suitable for Rollup bundling in development and production.
Traffic · last 30 days stale · no recent hits
total hits 11
actors 5 distinct systems
last hit 24d ago AhrefsBot
top countries 🇺🇸 United States · 🇫🇷 France · 🇬🇧 United Kingdom · 🇨🇦 Canada · 🇩🇪 Germany