rollup-plugin-babel-runtime-external
v2.0.0
Published
Rollup plugin to automatically exclude babel-runtime from your bundle
Downloads
52
Maintainers
Readme
rollup-plugin-babel-runtime-external
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