Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gem-mine/rollup-chain

Use a chaining API to generate and simplify the modification of rollup config
https://github.com/gem-mine/rollup-chain

Last synced: about 1 month ago
JSON representation

Use a chaining API to generate and simplify the modification of rollup config

Awesome Lists containing this project

README

        

# rollup-chain

类似webpackChain, 支持v2.18.1

# Demo

```js
const RollupChainConfig = require('@gem-mine/rollup-chain')
const config = new RollupChainConfig()

config.input('index')
.add('index', '/x.js')

config
.output(currentTarget)
.dir(api.resolve(options.outputDir))
.entryFileNames(outputFilename)
.chunkFileNames(outputFilename)
.format(currentTarget)
.sourcemap(needSourceMap)

config.plugin('node-resolve')
.use(nodeResolve, [{
rootDir: api.resolve('./'),
preferBuiltins: !options.browser,
browser: options.browser
}])
```