fly-rollup
v2.1.0
Published
Rollup plugin for Fly.
Downloads
7
Readme
fly-rollup
Install
This plugin requires Fly .
npm i --save-dev fly-rollup
Usage
Async/Await flavored:
export async function roll (fly) {
await fly
.source('src/entry.js') // just pass your entry file(s) here
.rollup({
rollup: { // rollup options
plugins: [
require('rollup-plugin-babel')()
]
},
bundle: { // bundle options
format: 'es'
}
})
.target('dist')
}
Generator function flavored:
exports.roll = function * (fly) {
yield fly
.source('src/entry.js') // just pass your entry file(s) here
.rollup({
rollup: { // rollup options
plugins: [
require('rollup-plugin-babel')()
]
},
bundle: { // bundle options
format: 'es'
}
})
.target('dist')
}
You just need to pass entry files to fly-rollup .
Sourcemap
Sourcemap is controlled by sourceMap
key in bundle options. It has 3 options:
true
: default value, generate external sourcemap along with bundle output.'inline'
: inline sourcemap.false
: disable sourcemap.
e.g.
fly.source
.rollup({
bundle: {
sourceMap: false // disable sourcemap
}
})
For other options:
See Rollup JavaScript API#rollup.rollup( options ) for rollup options .
See Rollup JavaScript API#bundle.generate( options ) for bundle options .