Skip to content

fix(node): normalize chunk parsing and lint scope#4529

Merged
ScriptedAlchemy merged 22 commits intomainfrom
codex/nextjs-mf-v9-compat-substrate
Mar 12, 2026
Merged

fix(node): normalize chunk parsing and lint scope#4529
ScriptedAlchemy merged 22 commits intomainfrom
codex/nextjs-mf-v9-compat-substrate

Conversation

@ScriptedAlchemy
Copy link
Copy Markdown
Member

@ScriptedAlchemy ScriptedAlchemy commented Mar 12, 2026

Description

This branch is primarily a @module-federation/node bug-fix lane, with a small repo-local PR metadata helper added alongside it.

Node changes:

  • align packages/node/.eslintrc.json with the repo's existing package conventions so generated dist output and declaration files are not linted
  • preserve the normalized webpack-path import convention while allowing the existing node/runtime require(...) pattern
  • normalize flush-chunks parsing so bare remotes, remote->request, and nested request paths resolve correctly
  • initialize globalThis.moduleGraphDirty earlier in hot-reload

Repo-local tooling changes:

  • add a gh-pr-metadata skill plus validator that checks PR title/body against .github/pull_request_template.md
  • ignore Python cache artifacts under .codex/skills

Validated with pnpm --filter @module-federation/node run lint and the normal pre-commit hook under Node 20.20.1.

Related Issue

No linked issue is referenced in this branch.

Types of changes

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

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

PR Stack

This PR is 1/1 in the stack.

Stack order (base -> tip):

  1. #4529 fix(node): normalize chunk parsing and lint scope (current, base, tip)

Navigation:

  • Prev: none (this is the base PR)
  • Next: none (this is the tip PR)
  • Stack refs: #4529
  • Branch: codex/nextjs-mf-v9-compat-substrate into main

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 12, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 40e2bf8
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69b31e5583df9b0008eb4e42
😎 Deploy Preview https://deploy-preview-4529--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 12, 2026

🦋 Changeset detected

Latest commit: 40e2bf8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 45 packages
Name Type
@module-federation/node Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/rsbuild-plugin Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
@module-federation/rspress-plugin Patch
remote5 Patch
remote6 Patch
website-new Patch
@module-federation/runtime Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/cli Patch
@module-federation/treeshake-server Patch
@module-federation/treeshake-frontend Patch
@module-federation/metro Patch
@module-federation/metro-plugin-rnef Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch

Not sure what this means? Click here to learn what changesets are.

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 12, 2026

Open in StackBlitz

@module-federation/devtools

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

@module-federation/cli

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

create-module-federation

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

@module-federation/data-prefetch

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

@module-federation/dts-plugin

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

@module-federation/enhanced

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

@module-federation/error-codes

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

@module-federation/esbuild

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

@module-federation/managers

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

@module-federation/manifest

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

@module-federation/metro

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

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

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

@module-federation/metro-plugin-rnef

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

@module-federation/modern-js

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

@module-federation/modern-js-v3

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

@module-federation/native-federation-tests

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

@module-federation/native-federation-typescript

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

@module-federation/nextjs-mf

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

@module-federation/node

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

@module-federation/retry-plugin

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

@module-federation/rsbuild-plugin

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

@module-federation/rspack

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

@module-federation/rspress-plugin

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

@module-federation/runtime

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

@module-federation/runtime-core

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

@module-federation/runtime-tools

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

@module-federation/sdk

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

@module-federation/storybook-addon

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

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

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

@module-federation/treeshake-frontend

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

@module-federation/treeshake-server

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

@module-federation/typescript

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

@module-federation/utilities

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

@module-federation/webpack-bundler-runtime

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

@module-federation/bridge-react

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

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

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

@module-federation/bridge-shared

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

@module-federation/bridge-vue3

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

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

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

commit: 7886f19

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

Bundle Size Report

11 package(s) changed, 29 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/cli 26.7 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/devtools 4.80 MB -8411 B (-0.2%) 0 B no change
@module-federation/enhanced 810.8 kB no change 712 B no change
@module-federation/managers 69.9 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 189.2 kB +754 B (+0.4%) 217 B no change
@module-federation/runtime 19.5 kB +13 B (+0.1%) 616 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.3 kB -34 B (-1.4%) 2.3 kB -34 B (-1.4%)
@module-federation/core 1.1 kB -33 B (-2.9%) 1.0 kB -31 B (-2.9%)
@module-federation/devtools n/a n/a n/a n/a
@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 -28 B (-0.3%) 9.2 kB -28 B (-0.3%)
@module-federation/runtime 625 B no change 625 B no change
@module-federation/storybook-addon 1.9 kB -25 B (-1.3%) 1.7 kB -25 B (-1.4%)
@module-federation/utilities 2.6 kB -32 B (-1.2%) 2.6 kB -32 B (-1.2%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 19.1 kB -18 B (-0.1%) 20.1 kB -21 B (-0.1%) +1.0 kB -3 B

Total dist (raw): 10.62 MB (-7644 B (-0.1%))
Total ESM gzip: 68.7 kB (no change)
Total web bundle (gzip): 158.6 kB (-303 B (-0.2%))
Total node bundle (gzip): 159.2 kB (-301 B (-0.2%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.5 kB (no change)
Tracked ./bundler node bundle (gzip): 4.5 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

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: b4c255dfa2

ℹ️ 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".

@ScriptedAlchemy ScriptedAlchemy changed the title feat(runtime): extract webpack compat substrate fix(node): align webpack path requires Mar 12, 2026
@ScriptedAlchemy ScriptedAlchemy changed the title fix(node): align webpack path requires fix(node): normalize chunk parsing and lint scope Mar 12, 2026
@ScriptedAlchemy ScriptedAlchemy merged commit ec7ab53 into main Mar 12, 2026
25 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the codex/nextjs-mf-v9-compat-substrate branch March 12, 2026 22:57
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant