rollup-plugin-auto-external
Rollup plugin to automatically exclude package.json dependencies and peerDependencies from your bundle.
Install
npm install --save-dev rollup-plugin-auto-external
Usage
rollup.config.js
Example ; input: 'index.js' plugins: ;
rollup.config.js
with options
Example ;; input: 'index.js' plugins: ;
rollup.config.js
with external
Example rollup-plugin-auto-external
does not overwrite the external option. The two can happily coexist.
; input: 'index.js' id plugins: ;
rollup.config.js
with per format options
Example ; 'es' 'umd';
Options
builtins
boolean
|string
: defaults to true
. Add all Node.js builtin modules (in the running version) as externals. Specify a string
value (e.g., '6.0.0'
) to add all builtin modules for a specific version of Node.js.
Rollup will complain if builtins
is present, and the build target is a browser. You may want rollup-plugin-node-builtins.
dependencies
boolean
: defaults to true
.
packagePath
string
: defaults to process.cwd()
. Path to a package.json file or its directory.
peerDependencies
boolean
: defaults to true
.