packages/babel-runtime/README.md
Source code of released version | Source code of development version
Meteor maintains a version of the runtime helpers needed by Babel-transpiled code. In most cases, the code is copied from Babel's helper implementations, though we have also made some changes.
Benefits of maintaining our own package include:
IE 8 support. Babel's helpers target IE 9 and do not work in IE 8, but generally IE 8 support can be achieved with only minor changes.
Backwards-compatibility. When the Babel compiler changes, the helpers sometimes change. Our Babel package can keep old helpers for back-compat. (If we change over to publishing original ES6 code in packages instead of transpiled code, this becomes less important.)
Client-side code size. We've made the helpers file as small as possible.
Helpers needed for each transform as of Babel v5.6.15:
taggedTemplateLiteralLooseinheritsclassCallCheckcreateClass (only for getter/setters)createDecoratedClass, defineDecoratedPropertyDescriptortemporalUndefined, temporalAssertDefineddefinePropertybind (for new A(...b))_extendsobjectWithoutPropertiesobjectDestructuringEmptyFootnotes:
A transform can be run in "loose," normal, or "spec" mode, with "loose" providing the fastest, most lightweight, and usually most browser-compatible transpilation, while "spec" mode tries extra hard to be spec-compliant at the expense of those things. We've found that "loose" mode is the best mode for production code for every transform we've looked at.
Decorators are still a Stage 1 proposal and are only implemented in Babel as an experiment.