Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(ci): switch bundle-size report to dist-report tree (#59703)

Paul D'Ambra0960e85eabd0
diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml
index fb3de63ae5aa..ee1a34cbd1d7 100644
--- a/.github/workflows/ci-frontend.yml
+++ b/.github/workflows/ci-frontend.yml
@@ -211,13 +211,15 @@ jobs:
- name: Check frontend bundle size
uses: preactjs/compressed-size-action@66325aad6443cb7cf89c4bfcd414aea2367cda94 # v2.9.1
with:
- build-script: '--filter=@posthog/frontend build'
+ build-script: '--filter=@posthog/frontend build:with-report'
install-script: 'pnpm --filter=@posthog/frontend... install'
compression: 'none'
- # Check all JS bundles in the dist folder
- pattern: 'frontend/dist/**/*.js'
- # Exclude source maps and chunk files (chunk hashes change every build)
- exclude: '{**/*.js.map,**/chunk*.js}'
+ # dist-report/ carries the source bundle (posthog-app, exporter, …) and source
+ # path in the filename, so strip-hash yields a deterministic identity. dist/ has
+ # cross-bundle basename collisions that cause phantom size changes.
+ pattern: 'frontend/dist-report/**/*.js'
+ # Shared chunk hashes change every build, ignore those
+ exclude: '{**/_chunks/chunk*.js}'
# Only show large changes
minimum-change-threshold: 1000
order-by: 'Size:desc'