一覧へ戻る
vovkabelov/rollup-plugin-reporter(新しいタブで開きます)
主要言語: JavaScript
Custom reports form Rollup
- star 数
- 0
- watcher 数
- 1
- fork 数
- 0
- issue 数
- 0
- 最終更新
- 2018/11/27
主要言語: JavaScript
Custom reports form Rollup
1. Install npm package via npm npm i rollup-plugin-reporter or via yarn yarn add rollup-plugin-reporter
2. Add plugin call into Rollup config, to plugins sections
// rollup.config.js import reporter from 'rollup-plugin-reporter'; module.exports = { ..., plugins: [ reporter() ], ... }
The custom report function will be called with a single data parameter.
// rollup.config.js import reporter from 'rollup-plugin-reporter'; module.exports = { ..., plugins: [ reporter({ report: data => { console.log(`${data.bundle} [${data.size.rendered}]`); } }) ], ... }
{ // Relative path to bundle file bundle: String, // Bundle size size: { original: Number, rendered: Number }, // List of modules included in current bundle modules: Array<String> }
{ // Excluded bundles from report exclude: Array<String>, // Custom report function report: Function }
Code and documentation copyright 2018 Vladimir Belov. Code released under the MIT license.