Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Rollup plugin to automatically exclude babel-runtime from your bundle

License

Notifications You must be signed in to change notification settings

stevenbenisek/rollup-plugin-babel-runtime-external

Repository files navigation

rollup-plugin-babel-runtime-external

Build Status

Rollup plugin to automatically exclude babel-runtime from your bundle.

Install

npm install --save-dev rollup-plugin-babel-runtime-external

Usage

Example rollup.config.js
import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external';

export default {
  input: 'index.js',
  plugins: [babelRuntimeExternal()],
};
Example rollup.config.js with options
import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external';

export default {
  input: 'index.js',
  plugins: [
    babelRuntimeExternal({
      helpers: false,
      polyfill: true,
      regenerator: false,
    }),
  ],
};
Example rollup.config.js with external

rollup-plugin-babel-runtime-external does not overwrite the external option. The two can happily coexist.

import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external';

export default {
  input: 'index.js',
  external: ['react'],
  plugins: [babelRuntimeExternal()],
};

Options

helpers

boolean: defaults to true

polyfill

boolean: defaults to true

regenerator

boolean: defaults to true

About

Rollup plugin to automatically exclude babel-runtime from your bundle

Resources

License

Stars

Watchers

Forks

Packages

No packages published