babel-plugin-transform-runtime

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals

Usage no npm install needed!

<script type="module">
  import babelPluginTransformRuntime from 'https://cdn.skypack.dev/babel-plugin-transform-runtime';
</script>

README

babel-plugin-transform-runtime

Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals

Installation

$ npm install babel-plugin-transform-runtime

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["transform-runtime"]
}

Via CLI

$ babel --plugins transform-runtime script.js

Via Node API

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