abandoned#4677
Conversation
…r api in node Co-Authored-By: Aime <aime@bytedance.com> Change-Id: I6ae25cc8818d50f877f6af6354ae5924d53eb576
- add a browser-safe IIFE build for the proxy runtime helpers and expose it as `FederationSdk` - surface the bundle through package metadata for CDN access - document the preload injection flow, internal `moduleInfo` usage, and the runtime version requirement - widen the snapshot typings to accept Vmok/Garfish `extendInfos` metadata and cover it with proxy tests - `pnpm exec prettier --check packages/sdk/README.md \ packages/sdk/tsdown.config.ts \ packages/sdk/src/proxy/iife.ts \ packages/sdk/src/types/snapshot.ts \ packages/sdk/__tests__/proxy-storage.spec.ts \ packages/sdk/__tests__/proxy-runtime.spec.ts \ packages/sdk/package.json` - `pnpm --filter @module-federation/sdk run build` - `pnpm --filter @module-federation/sdk run test` - the package build now emits `packages/sdk/dist/index.iife.js` - validation ran in the current workspace with Node `v22.22.0` - the repo declares Node `^20`, so pnpm printed an engine warning while the build and tests still passed Co-Authored-By: Aime <aime@bytedance.com> Change-Id: I48fb342965802a10fb9f6087d51c7978740c3aa9
Extract proxy debug functionality from `chrome-devtools` into the core `sdk` package. This move allows for: - Standalone usage of the proxy debug logic without full DevTools dependency. - More robust unit tests for proxy runtime and storage behaviors. - Consistent proxy implementation across different debugging environments. Modified packages: - `packages/chrome-devtools`: updated to consume the new SDK-based proxy logic. - `packages/sdk`: integrated the proxy implementation and added tests. Co-Authored-By: Aime <aime@bytedance.com> Change-Id: I71a2c4a75fd0611b4a313c917d315a652f55e402
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: 9b114b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 45 packages
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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b114b46d2
ℹ️ 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".
| import type { ModuleFederationRuntimePlugin } from '@module-federation/runtime'; | ||
| import type { Shared } from '@module-federation/runtime/types'; | ||
| import { loadScript, createScript } from '@module-federation/sdk'; | ||
| import { loadScript, createScript } from '@module-federation/sdk/proxy'; |
There was a problem hiding this comment.
Import script loaders from SDK root entry
@module-federation/sdk/proxy does not export loadScript or createScript (its barrel only re-exports proxy constants/runtime/storage/types), so this import cannot be satisfied. In practice this either fails the bundle/type build or leaves the fast-refresh plugin unable to load React UMD scripts when enableFastRefresh is on.
Useful? React with 👍 / 👎.
| import { | ||
| GlobalModuleInfo, | ||
| MODULE_DEVTOOL_IDENTIFIER, | ||
| } from '@module-federation/sdk'; | ||
| } from '@module-federation/sdk/proxy'; |
There was a problem hiding this comment.
Use exported proxy module-info key constant
MODULE_DEVTOOL_IDENTIFIER is not exported from @module-federation/sdk/proxy, so this import is unresolved from the new subpath. Because this file uses that symbol to read/write snapshot storage, the devtools layout script will fail to compile or execute with a broken module import.
Useful? React with 👍 / 👎.
Description
Related Issue
Types of changes
Checklist