# rollup-plugin-multi-entry

> Allows specifying multiple entry points with rollup.

Latest version **2.1.0** (published 2018-12-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install rollup-plugin-multi-entry
pnpm add rollup-plugin-multi-entry
yarn add rollup-plugin-multi-entry
bun add rollup-plugin-multi-entry
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2018-12-16 |
| First published | 2015-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 171 |
| Author | Brian Donovan |
| Maintainers | eventualbuddha, jamen, lukastaegert, rich_harris, trysound, victorystick |
| Keywords | rollup-plugin |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-multi-entry
- Repository: https://github.com/rollup/rollup-plugin-multi-entry
- Homepage: https://github.com/rollup/rollup-plugin-multi-entry#readme
- Issues: https://github.com/rollup/rollup-plugin-multi-entry/issues
- npm.io page: https://npm.io/package/rollup-plugin-multi-entry

## Dependencies (1)

- [matched](https://npm.io/package/matched.md) ^1.0.2

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 2.1.0 (latest) — 2018-12-16
- 2.0.2 — 2017-11-06
- 2.0.1 — 2016-08-01
- 2.0.0 — 2016-07-05
- 1.4.0 — 2016-06-10
- 1.3.0 — 2016-06-09
- 1.2.0 — 2016-03-09
- 1.1.0 — 2016-01-16
- 1.0.1 — 2015-12-05
- 1.0.0 — 2015-12-04

## README

# rollup-plugin-multi-entry

Use multiple entry points in your [rollup](https://github.com/rollup/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.

```js
// 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`.

> _Note_: Default exports like `export default class Foo {...}` will not be exported, only named exports are allowed.

## Install

```shell
# We use yarn:
$ yarn add [--dev] rollup-plugin-multi-entry
# But you can use npm if you prefer:
$ npm install [--save-dev] rollup-plugin-multi-entry
```

## Usage

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

```js
import multiEntry from "rollup-plugin-multi-entry";

export default {
  input: "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.

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

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

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

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

Sometimes you may not want to export anything from the rolled-up bundle. In
such cases, use the `exports: false` option like so:

```js
export default {
  input: "src/*.js",
  plugins: [multiEntry({ exports: false })]
};
```

## License

MIT

---
_Source: https://npm.io/package/rollup-plugin-multi-entry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
