Skip to content

chore(ci): expand bundle-size reporting with web/node metrics#4517

Merged
ScriptedAlchemy merged 4 commits intomainfrom
codex/bundle-size-split
Mar 11, 2026
Merged

chore(ci): expand bundle-size reporting with web/node metrics#4517
ScriptedAlchemy merged 4 commits intomainfrom
codex/bundle-size-split

Conversation

@ScriptedAlchemy
Copy link
Copy Markdown
Member

@ScriptedAlchemy ScriptedAlchemy commented Mar 10, 2026

Description

Expand scripts/bundle-size-report.mjs so bundle-size reporting captures target-aware output in addition to existing dist/entry metrics.

This PR:

  • keeps existing measurement and compare CLI flow intact
  • adds web/node bundle metrics (gzip + bytes) produced with rslib and ENV_TARGET
  • extends markdown compare output with separate sections for dist/entry vs target bundles
  • surfaces per-package bundle errors instead of silently dropping missing metrics

Scope

  • scripts/bundle-size-report.mjs only

Why split

This is the base PR in a stack so bundle-size behavior changes can be reviewed independently from sdk/runtime env changes.

Related PRs

Types of changes

  • Docs change / refactoring / dependency upgrade
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)

Test plan

Not re-run in this split operation. Validation is expected through CI on this PR.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 10, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 7ff7a9b
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69b0da9ed3c21900084fbdfc
😎 Deploy Preview https://deploy-preview-4517--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 10, 2026

⚠️ No Changeset found

Latest commit: 7ff7a9b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy changed the title chore(ci): expand bundle-size report with web/node metrics chore(ci): expand bundle-size reporting with web/node metrics Mar 10, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4d8fa2e467

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 11, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@b87dd65

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@b87dd65

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@b87dd65

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/@module-federation/data-prefetch@b87dd65

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@b87dd65

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@b87dd65

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@b87dd65

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@b87dd65

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@b87dd65

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@b87dd65

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@b87dd65

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@b87dd65

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@b87dd65

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@b87dd65

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@b87dd65

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@b87dd65

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@b87dd65

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@b87dd65

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@b87dd65

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@b87dd65

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@b87dd65

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@b87dd65

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@b87dd65

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@b87dd65

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@b87dd65

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@b87dd65

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@b87dd65

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@b87dd65

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@b87dd65

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@b87dd65

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@b87dd65

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@b87dd65

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@b87dd65

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@b87dd65

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@b87dd65

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@b87dd65

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@b87dd65

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@b87dd65

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@b87dd65

commit: b87dd65

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 11, 2026

Bundle Size Report

9 package(s) changed, 32 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/cli 27.4 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/enhanced 840.3 kB no change 712 B no change
@module-federation/managers 70.0 kB no change 334 B no change
@module-federation/manifest 138.4 kB no change 182 B no change
@module-federation/metro-plugin-rnc-cli 0 B no change 314 B no change
@module-federation/node 188.4 kB no change 217 B no change
@module-federation/storybook-addon 76.5 kB no change 100 B no change
@module-federation/utilities 110.6 kB no change 328 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.4 kB -35 B (-1.4%) 2.4 kB -35 B (-1.4%)
@module-federation/core 1.1 kB -33 B (-2.9%) 1.0 kB -31 B (-2.9%)
@module-federation/enhanced 5.9 kB -58 B (-0.9%) 5.9 kB -58 B (-0.9%)
@module-federation/managers 2.4 kB -27 B (-1.1%) 2.4 kB -27 B (-1.1%)
@module-federation/manifest 6.2 kB -40 B (-0.6%) 6.2 kB -40 B (-0.6%)
@module-federation/metro-plugin-rnc-cli 411 B -26 B (-5.9%) 411 B -26 B (-5.9%)
@module-federation/node 9.2 kB -30 B (-0.3%) 9.2 kB -30 B (-0.3%)
@module-federation/storybook-addon 1.9 kB -26 B (-1.3%) 1.7 kB -26 B (-1.4%)
@module-federation/utilities 2.6 kB -33 B (-1.2%) 2.6 kB -33 B (-1.2%)

Total dist (raw): 10.66 MB (no change)
Total ESM gzip: 75.2 kB (no change)
Total web bundle (gzip): 162.0 kB (-308 B (-0.2%))
Total node bundle (gzip): 163.5 kB (-306 B (-0.2%))

Bundle sizes are generated with rslib (Rspack). Web/node bundles set ENV_TARGET and enable tree-shaking. Bare imports are externalized to keep sizes consistent with prior reporting, and assets are emitted as resources.

@ScriptedAlchemy ScriptedAlchemy merged commit b872f0e into main Mar 11, 2026
24 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the codex/bundle-size-split branch March 11, 2026 03:49
@2heal1 2heal1 mentioned this pull request Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant