rollup-plugin-commonjs-alternate

JSON →
library 0.8.0 ·javascript maintenance
verified Apr 27, 2026

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.

total hits 12
actors 4 distinct systems
last hit 5d ago Bingbot
GPTBot
5
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇪🇸 Spain · 🇮🇳 India