babel-plugin-add-module-exports

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

This Babel plugin restores the pre-Babel 6 behavior where a default export is also assigned to `module.exports`, allowing `require()` to return the default value directly without the `.default` property. Version 1.0.4 is the latest stable release, with no active development. It works only with CommonJS/UMD module output (requires `modules` to be set to `'commonjs'` or `'umd'`). Unlike alternatives, it only adds `module.exports` when there is a single default export, preserving named exports.

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

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