rollup-plugin-babel-runtime-external

2.0.0 • Public • Published

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

Package Sidebar

Install

npm i rollup-plugin-babel-runtime-external

Weekly Downloads

7

Version

2.0.0

License

MIT

Unpacked Size

5.12 kB

Total Files

6

Last publish

Collaborators

  • stevenbenisek