# @yolodev/rollup-config-lerna

> Config for lerna based monorepos that builds all packages using a single rollup bundler

Latest version **0.3.1** (published 2019-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @yolodev/rollup-config-lerna
pnpm add @yolodev/rollup-config-lerna
yarn add @yolodev/rollup-config-lerna
bun add @yolodev/rollup-config-lerna
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2019-03-27 |
| First published | 2018-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 7 |
| Unpacked size | 96.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aleksander Heintz |
| Maintainers | alxandr |

## Links

- npm: https://www.npmjs.com/package/@yolodev/rollup-config-lerna
- npm.io page: https://npm.io/package/@yolodev/rollup-config-lerna

## Dependencies (7)

- [es6-error](https://npm.io/package/es6-error.md) 4.1.1
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) ^5.0.0
- [@lerna/package](https://npm.io/package/@lerna/package.md) 3.13.0
- [@lerna/project](https://npm.io/package/@lerna/project.md) ^3.13.1
- [@yolodev/rollup-config-core](https://npm.io/package/@yolodev/rollup-config-core.md) ^0.3.0
- [@yolodev/rollup-config-utils](https://npm.io/package/@yolodev/rollup-config-utils.md) ^0.3.0
- [@yolodev/rollup-config-delegate](https://npm.io/package/@yolodev/rollup-config-delegate.md) ^0.3.0

## Recent versions

- 0.3.1 (latest) — 2019-03-27
- 0.3.0 — 2019-02-16
- 0.2.0 — 2018-12-29
- 0.1.1 — 2018-09-20
- 0.1.0 — 2018-08-17

## README

# `@yolodev/rollup-config-lerna`

Config for lerna based monorepos that builds all packages using a single rollup bundler.

## Usage

Currently two different "modes" is supported in rollup-config-lerna, with more planned for
later. The first mode (`perPackage` mode) uses a separate `rollup.config.js` in each package. To use this,
put a `rollup.config.js` in the root directory (next to `lerna.json`) with the following
content:

```js
// rollup.config.js
import { perPackage } from '@yolodev/rollup-config-lerna';

export default perPackage();
```

This mode will fail if any of the packages does not have a `rollup.config.js`.

The second mode currently support is using a common config file for all modules. To use this mode,
first create a `rollup.lerna.js` file in the root folder (next to `lerna.json`), and put something
like the following in it:

```js
// rollup.lerna.js
export default (project, pkg, cmdOpts) => {
  return {
    input: './src/index.js',
    output: {
      file: './dist/index.js',
      format: 'cjs',
    },
    plugins: [],
  };
};
```

Then, in `rollup.config.js` put the following:

```js
// rollup.config.js
import { common } from '@yolodev/rollup-config-lerna';

export default common();
```

---
_Source: https://npm.io/package/@yolodev/rollup-config-lerna · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
