babel-plugin-transform-es2015-modules-systemjs
This plugin transforms ES2015 modules to SystemJS
Last updated 8 years ago by hzoo .
MIT · Repository · Original npm
$ cnpm install babel-plugin-transform-es2015-modules-systemjs 
SYNC missed versions from official npm registry.

babel-plugin-transform-es2015-modules-systemjs

This plugin transforms ES2015 modules to SystemJS.

Example

In

export default 42;

Out

System.register([], function (_export, _context) {
  return {
    setters: [],
    execute: function () {
      _export("default", 42);
    }
  };
});

Installation

npm install --save-dev babel-plugin-transform-es2015-modules-systemjs

Usage

Via .babelrc (Recommended)

.babelrc

Without options:

{
  "plugins": ["transform-es2015-modules-systemjs"]
}

With options:

{
  "plugins": [
    ["transform-es2015-modules-systemjs", {
      // outputs SystemJS.register(...)
      "systemGlobal": "SystemJS"
    }]
  ]
}

Via CLI

babel --plugins transform-es2015-modules-systemjs script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["transform-es2015-modules-systemjs"]
});

Current Tags

  • 6.24.1                                ...           latest (8 years ago)
  • 7.0.0-beta.3                                ...           next (8 years ago)

2 Versions

  • 7.0.0-beta.3                                ...           8 years ago
  • 6.24.1                                ...           8 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org