{"id":25244,"library":"es6-module-transpiler-globals-formatter","title":"es6-module-transpiler-globals-formatter","description":"Extension for the es6-module-transpiler that outputs exported module values as globals. Version 0.1.1 appears to be the only release; no release cadence indicated. Unlike the default BundleFormatter which keeps exports internal, this formatter assigns exported values to a named global object (e.g., window.myGlobal). Useful for exposing an ES6 module bundle as a global variable in legacy environments. Note that the transpiler repo is also archived, making this an abandoned approach.","status":"abandoned","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/mairatma/es6-module-transpiler-globals-formatter","tags":["javascript","es6","module","transpiler","module-formatter","globals"],"install":[{"cmd":"npm install es6-module-transpiler-globals-formatter","lang":"bash","label":"npm"},{"cmd":"yarn add es6-module-transpiler-globals-formatter","lang":"bash","label":"yarn"},{"cmd":"pnpm add es6-module-transpiler-globals-formatter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package extends the transpiler's Container and formatter interface.","package":"es6-module-transpiler","optional":false}],"imports":[{"note":"CJS only; no default export, must require the module.","wrong":"","symbol":"GlobalFormatter","correct":"var GlobalsFormatter = require('es6-module-transpiler-globals-formatter');"}],"quickstart":{"code":"var GlobalsFormatter = require('es6-module-transpiler-globals-formatter');\nvar transpiler = require('es6-module-transpiler');\nvar Container = transpiler.Container;\nvar FileResolver = transpiler.FileResolver;\n\nvar container = new Container({\n  resolvers: [new FileResolver(['lib/'])],\n  formatter: new GlobalsFormatter({globalName: 'myGlobal'})\n});\n\ncontainer.getModule('index');\ncontainer.write('out/mylib.js');","lang":"javascript","description":"Basic usage: configure a transpiler container with GlobalsFormatter to output ES6 module exports as a single global object."},"warnings":[{"fix":"Consider switching to a modern module bundler like Rollup or Webpack.","message":"This package depends on the now-abandoned es6-module-transpiler, which is no longer maintained.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Ensure the globalName is unique and not already used in the target environment.","message":"Global object assignments use this.exportedValues at runtime, which may cause conflicts with existing globals.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Do not rely on future maintenance.","message":"Only one version (0.1.1) was ever published; no updates since 2014.","severity":"gotcha","affected_versions":"0.1.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"npm install es6-module-transpiler --save-dev","cause":"Missing peer dependency es6-module-transpiler.","error":"Cannot find module 'es6-module-transpiler'"},{"fix":"Use var GlobalsFormatter = require('es6-module-transpiler-globals-formatter');","cause":"Using ES import syntax or destructuring incorrectly; require returns the constructor directly.","error":"TypeError: GlobalsFormatter is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}