parcel-plugin-bundle-visualiser icon indicating copy to clipboard operation
parcel-plugin-bundle-visualiser copied to clipboard

Only generate report if detailedReport option is set

Open adamduncan opened this issue 4 years ago • 0 comments

Current behavior

Generate report if process.env.NODE_ENV === 'production'

Proposed behavior

As well as checking NODE_ENV, we leverage Parcel's detailedReport option to determine whether to generate a report.

This is opposite of the plugin's existing behaviour, but affords the user control of when to generate reports, without modifying existing Parcel functionality.

Conscious this would be a breaking change, but wanted to float it, given https://github.com/gregtillbrook/parcel-plugin-bundle-visualiser/issues/14.

If the plugin's considering further development (or this is worth exploring), happy to write the tests, update docs, etc.

adamduncan avatar Apr 01 '20 10:04 adamduncan