Thanks a lot for the great plugin!
I noticed on the most recent version (0.48.2) of rollup this plugin seems to break. This is likely due to rollups changes in configurations and what gets passed into the ongenerate
hook.
On 0.47 the ongenerate
receives
{ bundle:
{ imports: [],
exports: [ 'default' ],
modules: [ [Object], [Object], [Object], [Object] ],
generate: [Function: generate],
write: [Function: write] },
entry: 'src/xx.js',
external: [ '' ],
globals: {},
format: 'umd',
moduleName: 'xx',
sourceMap: true,
plugins:
[ { name: 'node-resolve', resolveId: [Function: resolveId$1] },
{ name: 'babel',
options: [Function: options$1],
resolveId: [Function: resolveId],
load: [Function: load],
transform: [Function: transform$1] },
{ name: 'replace', transform: [Function: transform] },
{ name: 'uglify', transformBundle: [Function: transformBundle] },
{ name: 'rollup-plugin-bundle-size',
ongenerate: [Function: ongenerate] } ],
targets: [ { dest: 'dist/xxx.min.js', format: 'umd' } ],
onwarn: [Function: add],
dest: 'dist/xx.min.js' }
Whereas on 0.48 we receive
{ bundle:
{ imports: [],
exports: [ 'default' ],
modules: [ [Object], [Object], [Object], [Object] ],
generate: [Function: generate],
write: [Function: write] },
extend: undefined,
amd: {},
banner: undefined,
footer: undefined,
intro: undefined,
outro: undefined,
sourcemap: undefined,
name: undefined,
globals: {},
interop: undefined,
legacy: undefined,
indent: undefined,
strict: undefined,
noConflict: undefined,
paths: undefined,
format: 'cjs',
file: 'dist/xxx.cjs.js' }
This causes the plugin to break rollup-plugin-bundle-size/index.js:9
as we forward the dest
prop into path
which on 0.48 will be undefined and should be the file
property.
The fix seems relatively easy just not sure how the release would be handled - as what version and how peer dependencies should be pinned.