babel-plugin-rewire-exports

JSON →
library 2.3.0 ·javascript
verified May 27, 2026

Babel plugin for stubbing ES6/ES2015 module exports in tests. Version 2.3.0 (stable, last release 2021) allows rewriting exported values in importing modules without modifying module internals. Unlike babel-plugin-rewire, it keeps imports and local variables intact. It generates rewire/stub functions (rewire for default, rewire$name for named exports, and restore). Works with Babel 7 (use 0.x for Babel 6), supports browser and Node ESM, and bundles with Webpack, Rollup, SystemJS, and CommonJS via env preset. Release cadence: infrequent, no recent updates.

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

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