TrySound / rollup-plugin-size-snapshot

Track your library bundles size and its treeshakability with less effort
MIT License
164 stars 12 forks source link

Does not work with output.dir #29

Closed detj closed 4 years ago

detj commented 5 years ago

Expects outputOptions.file option to be set, but Rollup allows you to set outputOptions.dir too, in which case, outputOptions.file will be undefined.

https://github.com/TrySound/rollup-plugin-size-snapshot/blob/b86daaa0d7f0077fd02d50cdab14ddef6500b045/src/index.js#L74

Can this work without output.file? I suppose the file path/name has to be inferred somehow.

agats commented 5 years ago

+1 I'm running in this exact issue.

@TrySound Would it be fair to use outputOptions.dir if outputOptions.file is undefined?

m59peacemaker commented 4 years ago

Would a PR to support specifying the file as a plugin option be accepted?

sizeSnapshot({ file: './build/my-entrypoint.js' })
AshishMadaan commented 4 years ago

+1 facing the same issue. @TrySound when can we expect this to get fixed?

TrySound commented 4 years ago

Fixed in the new version