rollup-plugin-multi-dest
Enables multiple destination within a single rollup configuration.
Last updated 2 years ago by huyueb .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rollup-plugin-multi-dest 
SYNC missed versions from official npm registry.

rollup-plugin-multi-dest

Enables multiple destination within a single rollup configuration.

npm install rollup-plugin-multi-dest -D

No more rollup.config.es.js, rollup.config.umd.js and rollup -c rollup.config.es.js && rollup -c rollup.config.umd.js!

Example

// rollup.config.js
import multidest from 'rollup-plugin-multi-dest'
import nodeResolve from 'rollup-plugin-node-resolve'
import uglify from 'rollup-plugin-uglify'

export default {
    // targets "module" in package.json
    entry: 'src/app.coffee',
    dest: 'dist/app.es.js',
    format: 'es',
    plugins: [
        nodeResolve(),
        multidest([
            // targets "main" in package.json
            {
                dest: 'dist/app.cjs.js',
                format: 'cjs'
            },
            // targets browsers
            {
                dest: 'dist/app.min.js',
                format: 'iife',
                plugins: [
                    uglify()
                ]
            }
        ])
    ]
}

Enjoy!

Current Tags

  • 1.0.2                                ...           latest (2 years ago)

3 Versions

  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |