Converts anonymous System.register([]
into named System.register('name', [], ...
In
System.register([], function () {});
Out
System.register("foo", [], function () {});
$ npm install babel-plugin-transform-system-register
.babelrc
{
"plugins": [
["transform-system-register", {
"moduleName": "foo",
"systemGlobal": "SystemJS"
}]
]
}
$ babel --plugins transform-system-register script.js
require("babel-core").transform("code", {
plugins: [
["transform-system-register", {
moduleName: "foo",
systemGlobal: "SystemJS",
map: function(name) {
return normalize(name);
}
}]
]
});