An output formatter plugin for es6-module-transpiler that compiles ES6 module syntax into AMD define() format supported by RequireJS. Version 0.3.0 is the latest stable release; the project is in maintenance mode with no active development. It converts subsets of ES6 module syntax (import/export) into AMD-compatible code, supporting default exports, named exports, and re-exports. Unlike other transpilers like Babel, this plugin is tightly coupled to the now-deprecated es6-module-transpiler ecosystem and requires esprima for parsing. It compromises on ES6 features like live bindings and sealed objects to enable AMD compatibility. Requires Node.js and the es6-module-transpiler package at version 0.10.x.
npm install es6-module-transpiler-amd-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the AMD formatter with the es6-module-transpiler Container API to compile ES6 modules from 'lib/' into an AMD define() output file.
Migrate to a modern transpiler like Babel with @babel/plugin-transform-modules-amd.
Ensure es6-module-transpiler is at version ^0.10.0.
Avoid relying on live bindings; treat exports as static values.
Always install and import es6-module-transpiler along with this formatter.
Run `npm install es6-module-transpiler-amd-formatter` in your project directory.
Use `new (require('es6-module-transpiler-amd-formatter'))()` to instantiate the formatter.Install the package globally or locally, and ensure the module name is correct.