ES6 Module Transpiler System Formatter

raw JSON →
0.3.0 verified Fri May 01 auth: no javascript deprecated

An output formatter for es6-module-transpiler that generates System.register() format, enabling ES6 module semantics (including delayed execution, circular dependencies, and live bindings) in ES5. Current stable version: 0.3.0 (2015, no further updates). It integrates with SystemJS and es6-micro-loader and is interchangeable with Traceur's output. Key differentiator: preserves ES6 semantics exactly via the transpiler pipeline, but is experimental and no longer maintained. Use modern tools like Babel or TypeScript instead.

error Error: Cannot find module 'es6-module-transpiler-system-formatter'
cause The package is not installed or the path is incorrect when using CLI -f option.
fix
Install the package locally: npm install es6-module-transpiler-system-formatter, then use -f ./node_modules/es6-module-transpiler-system-formatter.
error TypeError: SystemFormatter is not a constructor
cause Using ES import (import SystemFormatter from ...) instead of CommonJS require.
fix
Use const SystemFormatter = require('es6-module-transpiler-system-formatter');
deprecated This package is no longer maintained. Use modern transpilers like Babel or TypeScript with SystemJS.
fix Migrate to Babel or TypeScript and use their respective module formats (System.register is still supported in SystemJS).
breaking Version 0.3.0 requires es6-module-transpiler 0.10. Incompatible with older versions.
fix Ensure es6-module-transpiler is at version ^0.10.0 when using this package.
gotcha The output format is experimental and may change between minor versions, breaking System.register() consumers.
fix Pin the exact version of this formatter and test compatibility with your loader.
gotcha This package does not support ES module syntax; it only works with CommonJS require.
fix Use CommonJS require() to import the formatter; do not attempt ES import.
npm install es6-module-transpiler-system-formatter
yarn add es6-module-transpiler-system-formatter
pnpm add es6-module-transpiler-system-formatter

Demonstrates programmatic usage with es6-module-transpiler to transpile ES6 modules into System.register format.

var transpiler = require('es6-module-transpiler');
var SystemFormatter = require('es6-module-transpiler-system-formatter');
var Container = transpiler.Container;
var FileResolver = transpiler.FileResolver;

var container = new Container({
  resolvers: [new FileResolver(['lib/'])],
  formatter: new SystemFormatter()
});

container.getModule('index');
container.write('out/mylib.js');