babel-plugin-transform-require-default

JSON →
library 0.1.7 ·javascript maintenance
verified May 27, 2026

A Babel plugin (v0.1.7, last updated 2018) that automatically transforms CommonJS require() calls to access .default for ES modules that use __esModule. Addresses Babel 6/7's breaking change where exported defaults are no longer assigned to module.exports, requiring manual .default access. Helps maintain backward compatibility in mixed ES module / CommonJS codebases. Use with caution: modifies module resolution behavior and may cause unintended side effects. Consider alternatives like using ES import syntax or newer Babel interop settings.

total hits 20
actors 7 distinct systems
last hit 1d ago AhrefsBot
MetaBot
4
ByteDance
3
GPTBot
2
Script
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇬🇧 United Kingdom