rollup-plugin-multidest

Enables multiple destination within a single rollup configuration.

Use 'targets' in rollup.config.js instead.
Last updated 2 years ago by audinue .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rollup-plugin-multidest 
SYNC missed versions from official npm registry.

rollup-plugin-multidest

Enables multiple destination within a single rollup configuration.

npm install rollup-plugin-multidest -D

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

Example

// rollup.config.js
import multidest from 'rollup-plugin-multidest'
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.0                                ...           latest (2 years ago)

1 Versions

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

Copyright 2014 - 2016 © taobao.org |