2.0.0 • Published 6 years ago

rollup-plugin-babel-runtime-external v2.0.0

Weekly downloads
439
License
MIT
Repository
github
Last release
6 years ago

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