Skip to content

Commit

Permalink
replace bundle size test dependency (#16)
Browse files Browse the repository at this point in the history
@ampproject/filesize has differing output in CI.
  • Loading branch information
niedzielski authored May 6, 2024
1 parent 242e675 commit 68f2eac
Show file tree
Hide file tree
Showing 3 changed files with 769 additions and 68 deletions.
5 changes: 5 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ All JavaScript and CSS build product gzipped sizes are tracked and tested with
(configured in package.json) just above the actual size so that it's easy to
track commit cost.

The underlying tool, `bundlesize`, does not report failures well for large
bundles. To get the actual uncompressed size to set in the package.json, use
stat, divide by 1024, and round up to the nearest 10th of a kibibyte like
`stat -c "%s" dist/protos.min.js|numfmt --to-unit=Ki --format=%.1f`.

The contents of each bundle generated can be evaluated through its source map.
[source-map-explorer](https://github.com/danvk/source-map-explorer) and
[Lighthouse](https://developer.chrome.com/docs/lighthouse/overview) can be used
Expand Down
Loading

0 comments on commit 68f2eac

Please sign in to comment.