github / webpack-bundlesize-compare-action

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

Parse stats over 512MB #295

Closed nskazki closed 1 year ago

nskazki commented 1 year ago

This patch adds support for stats files over 512MB by utilizing the library Webpack uses to produce them.

I've tested it locally on a 600MB stats file of a real project and generated demo stats for you to play with. I wish I could expose the real ones, but it's a work project, and I better play it safe.

The demo files were created by installing half the npm registry and compiling import('./node_modules/' + anything + '.js') with Webpack.

Demo stats:

  1. head.json.zip (527MB)
  2. base.json.zip (516MB)

Their difference generated by the patched action:

Files count Type Total bundle size % Changed
5048 -> 5201 bundled 76.49 MB -> 79.05 MB (+2.57 MB) +3.36%
mattcosta7 commented 1 year ago

Thanks for this!

mattcosta7 commented 1 year ago

Will land this in the next version, once #297 lands

nskazki commented 1 year ago

Thanks!