4.6.0 introduced an issue with the bundle size that went unnoticed. As a comment on PR #474 which fixes the size issue, @nathancahill suggested we make bundle size part of the build process.
Instead of the build process, I think we should add it as a test. That way when a PR breaks the build, CI will fail. If it's part of the build process, we will only notice something is broken when we try to do a release and have to hunt down which PR broke it.
It would require us to do a prod build before running the tests. This currently takes ~13s on my machine.
Initially I would suggest we set the limit to 150kB. That's ~50% above the current size. This should catch increases introduced by both #399 and #433.
This wouldn't be a hard limit either. We just need some number to catch big increases.
4.6.0 introduced an issue with the bundle size that went unnoticed. As a comment on PR #474 which fixes the size issue, @nathancahill suggested we make bundle size part of the build process.
Instead of the build process, I think we should add it as a test. That way when a PR breaks the build, CI will fail. If it's part of the build process, we will only notice something is broken when we try to do a release and have to hunt down which PR broke it.
It would require us to do a prod build before running the tests. This currently takes ~13s on my machine.
Initially I would suggest we set the limit to 150kB. That's ~50% above the current size. This should catch increases introduced by both #399 and #433.
This wouldn't be a hard limit either. We just need some number to catch big increases.