Babel Plugin Explicit Exports References

JSON →
library 1.0.2 ·javascript
verified May 27, 2026

A Babel plugin that transforms internal references to a module's exports so they use `module.exports` instead of direct local variable references. This enables mocking of exported functions in Jest with Babel/TypeScript, even when those functions call each other internally within the same module. Version 1.0.2, actively maintained. Key differentiator: addresses the common problem of internal function references not being mockable in test environments, unlike other solutions that require manual refactoring or alternative mocking strategies.

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

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