Files
babel/lib/6to5/transformation/transformers/optional-external-runtime.js
Aluísio Augusto Silva Gonçalves 8d288c01ca 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.
2015-01-18 20:39:35 -02:00

11 lines
333 B
JavaScript

exports.optional = true;
// In theory, it would be more appropriate to do this in `manipulateOptions`,
// but we need an identifier for the import and we can't get that before the
// AST is built.
exports.ast = {
enter: function (ast, file) {
file.opts.runtime = file.addImport("6to5-runtime/6to5", "to5Runtime").name;
}
};