Skip to content

docs: fix non-existent bridge-react/react import path - #4971

Open
Gmendesfonseca wants to merge 1 commit into
module-federation:mainfrom
Gmendesfonseca:docs/fix-bridge-react-subpath
Open

docs: fix non-existent bridge-react/react import path#4971
Gmendesfonseca wants to merge 1 commit into
module-federation:mainfrom
Gmendesfonseca:docs/fix-bridge-react-subpath

Conversation

@Gmendesfonseca

@Gmendesfonseca Gmendesfonseca commented Aug 7, 2026

Copy link
Copy Markdown

Description

The Producer API and Consumer API tables in the React Bridge getting-started guide point readers at @module-federation/bridge-react/react. That subpath is not in the package's exports map, so an import copied from these tables fails to resolve:

$ node -e "require.resolve('@module-federation/bridge-react/react')"
MODULE_NOT_FOUND

git log -S'"./react"' -- packages/bridge/bridge-react/package.json returns no commits, so this is a path that never existed rather than one that was removed and needs restoring. Neither of the two open PRs that modify that exports map (#4837, #4869) adds it.

The correct entry point for the legacy (React 16/17) createBridgeComponent, for createRemoteAppComponent and for lazyLoadComponentPlugin is the package root:

  • apps/router-demo uses the package root for all six of its createBridgeComponent / createRemoteAppComponent imports, and /v18, /v19 and /plugin for the rest. /react appears zero times.
  • The sibling load-app.mdx and export-app.mdx guides already use the package root in their code samples.

So the getting-started tables currently contradict both the working examples and the neighbouring pages. A reader following the entry-point tables — the first concrete instruction on the page — hits a module resolution error before anything else.

This PR replaces all 9 occurrences across the English, Simplified Chinese and Brazilian Portuguese pages.

This is a documentation-only change. It does not change runtime behavior or the public API.

Validation

  • prettier --check apps/website-new/docs/{en,zh,pt-BR}/guide/bridge/react/getting-started.mdx — all matched files use Prettier code style

Related Issue

N/A — documentation-only correction.

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.

The Producer and Consumer API tables in the React Bridge getting-started
guide point at `@module-federation/bridge-react/react`. That subpath is not
in the package's `exports` map and never has been, so the import fails to
resolve:

    $ node -e "require.resolve('@module-federation/bridge-react/react')"
    MODULE_NOT_FOUND

The correct entry for the legacy (React 16/17) `createBridgeComponent`, for
`createRemoteAppComponent` and for `lazyLoadComponentPlugin` is the package
root, which is what `apps/router-demo` and the sibling `load-app` /
`export-app` guides already use.

Replaces all 9 occurrences across en, zh and pt-BR.
@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5433f05

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

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