fix(enhanced,sdk,runtime): tree-shake env-target runtime paths#4518
fix(enhanced,sdk,runtime): tree-shake env-target runtime paths#4518ScriptedAlchemy merged 11 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: e0bd4d6 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: 51ba4b70e2
ℹ️ 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".
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/data-prefetch
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/esbuild
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/modern-js
@module-federation/modern-js-v3
@module-federation/native-federation-tests
@module-federation/native-federation-typescript
@module-federation/nextjs-mf
@module-federation/node
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/storybook-addon
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/typescript
@module-federation/utilities
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Bundle Size Report20 package(s) changed, 21 unchanged. Package dist + public ESM exports
Bundle targets
Total dist (raw): 10.67 MB (-31778 B (-0.3%)) Bundle sizes are generated with rslib (Rspack). Public ESM gzip aggregates explicit package export entry files (wildcard exports are ignored). Web/node bundles synthesize a single entry that imports those public ESM exports, set ENV_TARGET, and enable tree-shaking. Bare imports are externalized to keep sizes consistent with prior reporting, and assets are emitted as resources. |
6b4b44d to
634d0a7
Compare
Description
Build on the new runtime
/bundlerentrypoints to make the federation runtime path tree-shakeable, while preserving compatibility for older customimplementationoverrides that still only exposedist/index.*.This PR:
isBrowserEnvValueas anENV_TARGET-aware static value in sdk/bundlerdist/index.jsanddist/index.cjsfor older runtime-tools implementationslocal-ciskill used for local CI parity runs in this checkoutContext
Test plan
pnpm --filter @module-federation/rspack testpnpm --filter @module-federation/enhanced testpnpm exec turbo run build --filter=@module-federation/runtime --filter=@module-federation/runtime-tools --filter=@module-federation/webpack-bundler-runtime --filter=@module-federation/enhanced --filter=@module-federation/rspack --forcepnpm run ci:local --only=build-and-testPR Stack
This PR is 2/3 in the stack.
Stack order (base -> tip):
Navigation:
#4526 -> #4518 -> #4527codex/env-runtime-stackedintocodex/runtime-bundler-entrypoints