A babel plugin/module formatter that transforms ES6 module exports into global variable assignments. Version 0.1.4 is the latest stable release (low cadence, no updates since 2016). It provides a way to use ES6 modules in non-module environments by exposing exports on the global object. Works with Babel 5.x only; not compatible with Babel 6+ due to API changes. Key differentiator: simple, lightweight solution for legacy browser bundles without module loaders.
npm install babel-globals-module-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows configuration for Babel 5 to use the formatter and how ES6 exports become globals.
Migrate to Babel 6+ with @babel/plugin-transform-modules-umd or similar.
Use Babel 5 or switch to a different module formatter for global exports.
Avoid circular dependencies when using this formatter.
Ensure Babel already converts ES imports to CommonJS before applying this formatter.
Set it as the value for 'modules' in Babel 5 .babelrc (e.g., { "modules": "babel-globals-module-formatter" }).Use Babel 5 or a different plugin for global export.