Skip to content

abandoned#4677

Closed
2heal1 wants to merge 3 commits into
module-federation:mainfrom
2heal1:feat/proxy-sdk
Closed

abandoned#4677
2heal1 wants to merge 3 commits into
module-federation:mainfrom
2heal1:feat/proxy-sdk

Conversation

@2heal1

@2heal1 2heal1 commented Apr 21, 2026

Copy link
Copy Markdown
Member

Description

Related Issue

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.

2heal1 and others added 3 commits April 21, 2026 19:32
…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
@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 9b114b4
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69e7646bd096510008f3e810
😎 Deploy Preview https://deploy-preview-4677--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

changeset-bot Bot commented Apr 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9b114b4

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/sdk Patch
@module-federation/devtools Patch
@module-federation/cli Patch
@module-federation/data-prefetch Patch
@module-federation/dts-plugin Patch
@module-federation/enhanced Patch
@module-federation/esbuild Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/metro Patch
@module-federation/modern-js-v3 Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/retry-plugin Patch
@module-federation/rsbuild-plugin Patch
@module-federation/rspack Patch
@module-federation/rspress-plugin Patch
@module-federation/runtime-core Patch
@module-federation/runtime Patch
@module-federation/storybook-addon Patch
@module-federation/utilities Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/metro-plugin-rnef Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch
remote5 Patch
remote6 Patch
website-new Patch
@module-federation/runtime-tools Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/bridge-shared Patch
@module-federation/error-codes Patch
create-module-federation Patch
@module-federation/treeshake-server Patch
@module-federation/treeshake-frontend 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

@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: 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';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines 5 to +8
import {
GlobalModuleInfo,
MODULE_DEVTOOL_IDENTIFIER,
} from '@module-federation/sdk';
} from '@module-federation/sdk/proxy';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@2heal1 2heal1 closed this Apr 24, 2026
@2heal1 2heal1 deleted the feat/proxy-sdk branch April 24, 2026 04:04
@2heal1 2heal1 changed the title feat:proxy sdk abandoned Apr 24, 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