github / webpack-bundlesize-compare-action

A github action that outputs bundlesize comparison tables for pull requests
MIT License
78 stars 19 forks source link

Report on initial chunks #462

Open mariaines opened 1 year ago

mariaines commented 1 year ago

Fixes https://github.com/github/webpack-bundlesize-compare-action/issues/460

This PR adds a line under "Total" to show the file count / diff for only initial chunks, when using code splitting. If no code splitting, initial isn't reported by webpack and thus the initial line shouldn't show up.

@camchenry I wasn't sure how to generate new json mock files to update the tests. Is there a repo somewhere I can update? If not happy to just make a toy app to generate some async examples from.

camchenry commented 1 year ago

@camchenry I wasn't sure how to generate new json mock files to update the tests. Is there a repo somewhere I can update? If not happy to just make a toy app to generate some async examples from.

Unfortunately, no we don't have any such tool yet. To be honest, I hand-wrote some of the stats JSON files by manually copying and pasting the stats around 😱😅