Skip to content

feat: extract @module-federation/data-fetch from bridge-react - #4978

Open
tonoizer wants to merge 11 commits into
module-federation:mainfrom
tonoizer:feat/extract-data-fetch-package
Open

feat: extract @module-federation/data-fetch from bridge-react#4978
tonoizer wants to merge 11 commits into
module-federation:mainfrom
tonoizer:feat/extract-data-fetch-package

Conversation

@tonoizer

@tonoizer tonoizer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extract isomorphic data fetch / prefetch / cache into framework-agnostic @module-federation/data-fetch
  • Keep @module-federation/bridge-react/data-fetch (+ related subpaths) as backward-compatible re-exports
  • Wire @module-federation/bridge-vue3 to re-export the same agnostic utility subset (callDataFetch, flushDataFetch, setSSREnv, cache/prefetch APIs, NoSSRRemoteInfo)
  • Update website docs (en/zh/pt-BR) to prefer @module-federation/data-fetch for agnostic APIs, with install guidance; React-only UI APIs stay on bridge-react
  • Document in AGENTS.md that apps/website-new/docs/ must stay in sync (including locale parity) when publishable package APIs change
  • Changeset: patch for data-fetch, bridge-react, bridge-vue3; package added to fixed release group

Motivation

Data fetch/prefetch/cache are not React-Bridge concerns. They should be usable without Bridge and shared across React/Vue consumers without duplicating logic under bridge-react.

Vue createLazyComponent note

React keeps createLazyComponent as the component-remote UI adapter on top of the shared data-fetch core. A Vue equivalent is not required for this extraction and is not implemented here. It can land later for bridge feature completeness (component-level remotes + data loaders in Vue hosts), or as a separate PR, if that product use case is confirmed. App-level Vue remotes continue to use Vue Bridge (createBridgeComponent / createRemoteAppComponent).

Testing

  • pnpm --filter @module-federation/data-fetch run build
  • pnpm --filter @module-federation/bridge-react run build
  • pnpm --filter @module-federation/bridge-vue3 run build
  • pnpm --filter @module-federation/data-fetch run test (15 tests)
  • format / turbo / publint local scripts
  • website docs + AGENTS.md updated for the new package surface
  • GitHub Actions — needs maintainer Approve and run workflows for this fork PR

@changeset-bot

changeset-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 064221f

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

This PR includes changesets to release 49 packages
Name Type
@module-federation/data-fetch Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/playground Patch
remote5 Patch
remote6 Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider 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-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rstest 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/rspress-plugin 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-rock Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/esbuild Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/observability-plugin Patch
website-new Patch
@module-federation/storybook-addon Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/utilities Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote 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

tonoizer and others added 5 commits August 10, 2026 20:28
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… sync

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@tonoizer
tonoizer marked this pull request as ready for review August 10, 2026 21:41

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

Copy link
Copy Markdown

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

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

Comment thread packages/data-fetch/package.json Outdated
tonoizer and others added 4 commits August 11, 2026 02:29
Resolve pnpm-lock.yaml conflict and make @module-federation/runtime a hard dependency of @module-federation/data-fetch so the root entry's prefetch/helpers import resolves for bridge re-export consumers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the temporary hook-safe turbo bypass from the merge commit.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve pnpm-lock.yaml conflict after latest main updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve pnpm-lock.yaml conflict after latest main updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
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