Import ES6 functions and helpers from 6to5-runtime
The new `6to5-runtime` packs core-js, 6to5's helpers and the Regenerator runtime, and we're moving `coreAliasing`, `externalRuntime` and `externalRegenerator` to use it instead of forcing the user to depend on these packages directly.
This commit is contained in:
@@ -23,7 +23,7 @@ exports.optional = true;
|
||||
|
||||
exports.ast = {
|
||||
enter: function (ast, file) {
|
||||
file._coreId = file.addImport("core-js/library", "core");
|
||||
file._coreId = file.addImport("6to5-runtime/core-js", "core");
|
||||
},
|
||||
|
||||
exit: function (ast, file) {
|
||||
|
||||
@@ -4,7 +4,7 @@ exports.optional = true;
|
||||
|
||||
exports.ast = {
|
||||
enter: function (ast, file) {
|
||||
file._regeneratorId = file.addImport("regenerator/runtime-module", "regeneratorRuntime");
|
||||
file._regeneratorId = file.addImport("6to5-runtime/regenerator", "regeneratorRuntime");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@ exports.optional = true;
|
||||
// AST is built.
|
||||
exports.ast = {
|
||||
enter: function (ast, file) {
|
||||
file.opts.runtime = file.addImport(file.opts.runtime, "to5Runtime").name;
|
||||
file.opts.runtime = file.addImport("6to5-runtime/6to5", "to5Runtime").name;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user