@yolodev/rollup-config-lerna
Config for lerna based monorepos that builds all packages using a single rollup bundler
Last updated 8 months ago by alxandr .
MIT · Original npm · Tarball · package.json
$ cnpm install @yolodev/rollup-config-lerna 
SYNC missed versions from official npm registry.

@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:

// 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:

// 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:

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

export default common();

Current Tags

  • 0.3.1                                ...           latest (8 months ago)

5 Versions

  • 0.3.1                                ...           8 months ago
  • 0.3.0                                ...           9 months ago
  • 0.2.0                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |