ci(codecov): webpack bundle-stats job#540
Conversation
Matches the OIDC auth used for coverage/test-results uploads (PR #535) so the build workflow no longer needs a CODECOV_TOKEN secret. Gate the plugin on GITHUB_ACTIONS so local builds skip the upload step.
Next.js 16 defaults to Turbopack, which skips next.config.mjs's webpack() hook — so @codecov/nextjs-webpack-plugin never registers in the deploy build. Add a parallel job that runs `next build --webpack` solely so the plugin can upload bundle stats via OIDC. The deploy build in build.yml stays on Turbopack.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
@trpc/react-query@11's shared chunk uses ESM named exports that webpack can't resolve (Turbopack handles them). Gate transpilePackages on CODECOV_BUNDLE_STATS=1 so prod Turbopack builds are untouched.
@trpc/react-query v11 ships ESM bundled by tsdown with __commonJS/ __toESM interop wrappers. Webpack's strict ESM analysis can't see named exports through them and fails to compile, though runtime is fine. Set exportsPresence: 'warn' for the bundle-stats build only.
|
Closing — Why:
What stays: the OIDC switch in #538 is harmless — the If we ever want bundle-regression visibility before then: diff |
Summary
webpack()hook innext.config.mjs, so@codecov/nextjs-webpack-pluginnever runs during the deploy build (verified on commit fdce534 — no Codecov upload inBuild & Packagelogs).bundle-stats.yml: runsnext build --webpackas a parallel CI job purely so the Codecov plugin can register and upload bundle stats via OIDC. The deploy build inbuild.ymlstays on Turbopack.Caveat
Reports webpack bundle sizes, not the Turbopack bundles we actually ship. Reasonable proxy for regression detection; not exact for absolute size. Revisit when Codecov ships a Turbopack plugin.
Test plan
sleepypod-coreto Codecov.Build & Package(Turbopack) remains untouched.