Repository navigation
perf: slim deps - #4897
perf: slim deps#4897
Conversation
🦋 Changeset detectedLatest commit: 0b49496 The changes in this PR will be included in the next version bump. This PR includes changesets to release 47 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 |
|
🚀 Preview Environment Ready!
Details:
|
@module-federation/devtools
@module-federation/cli
create-module-federation
@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/metro-plugin-rock
@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/observability-plugin
@module-federation/playground
@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: |
Bundle Size Report14 package(s) changed, 28 unchanged. Package dist + ESM entry
Bundle targets
Consumer scenarios
Total dist (raw): 35.67 MB (-578242 B (-1.5%)) Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as |
92f019b to
8352c8e
Compare
## Summary - Update the Modern.js compatibility documentation to record that the historical `@module-federation/bridge-react/size-limited-cache` export gap was fixed upstream in [Module Federation Core PR #4897](module-federation/core#4897). - Keep Modern.js explicitly `partial`: the repository smoke covers the Doctor adapter and Rspack-under-the-hood, not a full `@modern-js/app-tools` core-demo soak. - Keep #130 as the tracking issue for the final external soak instead of claiming unsupported evidence; #130 remains open until that verification exists. - Align the Modern.js smoke README with the current #130 tracker. Refs #130 ## Verification - `corepack pnpm docs:build` - `corepack pnpm exec vitest run test/unit/plugin-modern.test.ts` — 4 passed - `corepack pnpm --filter @mfdoctor-example/modern-smoke build` - `git diff --check` ## Scope notes - The published `@module-federation/bridge-react@2.8.2` package exports `./size-limited-cache`. - A full Core `@modern-js/app-tools` re-soak is still external evidence. The local Windows Core checkout cannot provide that proof because its workspace build path requires Unix `cp` tooling and the initial install reaches the excluded DevTools/WSL setup; no Doctor adapter defect was reproduced. - This PR leaves #130 open pending the external verification and does not touch the DevTools work tracked separately.
Description
This PR reduces package size and dependency installation cost by replacing several general-purpose dependencies with small internal implementations.
Key changes:
lru-cachewith a lightweight size-limited cache.upath,semver,node-schedule,empathic, andexsolve.@modern-js/utils.react-error-boundaryand provide a small internal error boundary.node-fetchfrom the Modern.js integrations and set their minimum Node.js version to 18.Bundle size impact
The latest GitHub bundle-size report for commit
8352c8ecompares this PR against the currentmainbranch. Both sides are built separately, minified, and measured with gzip.bridge-reactbuilt outputbridge-reactweb bundlebridge-reactNode bundlebridge-react-webpack-pluginbuilt outputbridge-react-webpack-pluginweb and Node bundlesthird-party-dts-extractorbuilt outputSmall output increases were accepted where replacing an external dependency requires local code:
dts-plugin: +43 B gzip (+0.3%). Its main benefit is removingnode-schedulefrom the installed dependency tree.managers: +64 B gzip (+2.7%) while removingempathic.sdk: +4.9 kB raw output (+3.8%) for the shared lightweight cache implementation.Validation
The Metro, application, Next.js, router, and DevTools end-to-end jobs were not run locally because this PR does not change those areas. GitHub-only checks are left to CI.
Related Issue
N/A
Types of changes
Checklist