New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rollup-plugin-multi-entry

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-multi-entry

Allows specifying multiple entry points with rollup.

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.1K
decreased by-21.49%
Maintainers
1
Weekly downloads
 
Created
Source

rollup-plugin-multi-entry

Use multiple entry points in your rollup bundle. This is particularly useful for tests, but can also be used to package a library. The exports from all the entry points will be combined, e.g.

// a.js
export const a = 1;

// b.js
export const b = 2;

// c.js
export const c = 3;

Using all three files above as entry points will yield a bundle with exports for a, b, and c.

Install

$ npm install [--save-dev] rollup-plugin-multi-entry

Usage

This plugin requires at least v0.25.4 of rollup. In rollup.config.js:

import multiEntry from 'rollup-plugin-multi-entry';

export default {
  entry: 'test/**/*.js',
  plugins: [multiEntry()]
};

The entry above is the simplest form which simply takes a glob string. If you wish, you may pass an array of glob strings or, for finer control, an object with include and exclude properties each taking an array of glob strings, e.g.

// The usual rollup entry configuration works.
export default {
  entry: 'just/one/file.js',
  plugins: [multiEntry()]
  // ...
};

// As does a glob of files.
export default {
  entry: 'a/glob/of/files/**/*.js',
  plugins: [multiEntry()]
  // ...
};

// Or an array of files and globs.
export default {
  entry: ['an/array.js', 'of/files.js', 'or/globs/**/*.js'],
  plugins: [multiEntry()]
  // ...
};

// For maximum control, arrays of globs to include and exclude.
export default {
  entry: {
    include: ['files.js', 'and/globs/**/*.js', 'to/include.js'],
    exclude: ['those/files.js', 'and/globs/*.to.be.excluded.js']
  },
  plugins: [multiEntry()]
  // ...
};

License

MIT

Keywords

FAQs

Package last updated on 09 Mar 2016

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