Preparing for system design interviews?  Try bugzed.com →

babel-plugin-add-module-exports

JSON →
library 1.0.4 ·javascript maintenance
verified Jun 17, 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 13
actors 4 distinct systems
last hit 20d ago AhrefsBot
GPTBot
4
Script
1
ByteDance
1
Humans
4

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