rollup-make-bundles
Make bundles with their own config merged with base config
Last updated 3 years ago by funch .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rollup-make-bundles 
SYNC missed versions from official npm registry.

rollup-make-bundles

Make bundles with their own config merged with base config.

Install

npm i rollup-make-bundles --save

Usage

const rollupMakeBundles = require('rollup-make-bundles');
const baseConfig = {
  entry: './src/index.js',
  plugins: [
    require('rollup-plugin-json')(),
    require('rollup-plugin-buble')()
  ],
  banner: `/*! hello world */`, // or Object
  eslint: true // default: false
};
const bundlesConfig = {
  ESModule: {
    dest: 'dist/hello.es.js',
    format: 'es'
  },
  CommonJS: {
    dest: 'dist/hello.common.js',
    format: 'cjs'
  },
  development: {
    dest: 'dist/hello.js',
    format: 'umd'
  },
  production: {
    dest: 'dist/hello.min.js',
    format: 'umd',
    plugins: [
      require('rollup-plugin-uglify')({
        output: {
          comments: (node, comment) => {
            return comment.type == "comment2" && /^!/i.test(comment.value);
          }
        }
      })
    ]
  }
};
rollupMakeBundles(baseConfig, bundlesConfig)
  .then(message => console.log(message))
  .catch(err => console.log(err));

// or
rollupMakeBundles.easy({
  entry: 'src/index.js',
  presetPlugins: true
}, {
  dest: 'dist',
  name: 'hello'
});

Current Tags

  • 1.0.8                                ...           latest (3 years ago)

9 Versions

  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 2
Last Week 0
Last Month 3
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |