Rollup plugin to automatically exclude babel-runtime from your bundle.
npm install --save-dev rollup-plugin-babel-runtime-external
import babelRuntimeExternal from 'rollup-plugin-babel-runtime-external';
export default {
input: 'index.js',
plugins: [babelRuntimeExternal()],
};
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()],
};
boolean
: defaults to true
boolean
: defaults to true
boolean
: defaults to true