Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-auto-external

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-auto-external

Rollup plugin to automatically exclude package.json dependencies and peerDependencies from your bundle

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
23K
decreased by-41.61%
Maintainers
1
Weekly downloads
 
Created
Source

rollup-plugin-auto-external

Build Status

Rollup plugin to automatically exclude package.json dependencies and peerDependencies from your bundle.

Install

npm install --save-dev rollup-plugin-auto-external

Usage

Example rollup.config.js
import autoExternal from 'rollup-plugin-auto-external';

export default {
  entry: 'index.js',
  plugins: [
    autoExternal(),
  ],
};
Example rollup.config.js with options
import autoExternal from 'rollup-plugin-auto-external';

export default {
  entry: 'index.js',
  plugins: [
    autoExternal({
      dependencies: true,
      peerDependencies: false,
    }),
  ],
};
Example rollup.config.js with external

rollup-plugin-auto-external does not overwrite the external option. The two can happily coexist.

import autoExternal from 'rollup-plugin-auto-external';

export default {
  entry: 'index.js',
  external: id => id.includes('babel-runtime'),
  plugins: [
    autoExternal(),
  ],
};

Options

dependencies

boolean: defaults to true if the bundle format is cjs or es; false otherwise.

peerDependencies

boolean: defaults to true.

Keywords

FAQs

Package last updated on 31 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc