Skip to content

feat(modern-js): enbale asyncStartup by default#4531

Merged
2heal1 merged 13 commits intomainfrom
feat/rspack-async-startup
Mar 13, 2026
Merged

feat(modern-js): enbale asyncStartup by default#4531
2heal1 merged 13 commits intomainfrom
feat/rspack-async-startup

Conversation

@2heal1
Copy link
Copy Markdown
Member

@2heal1 2heal1 commented Mar 12, 2026

Description

enbale asyncStartup by default

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 8 commits December 23, 2025 17:32
- Add @rspack/core canary version to package.json overrides
- Allow any @rspack/* peer dependencies
- Fix indentation in config type definitions
- Enable asyncStartup for rspack bundler when not explicitly disabled
- Remove redundant enableAsyncEntry condition in source config
…rtup

# Conflicts:
#	package.json
#	pnpm-lock.yaml
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 12, 2026

Deploy Preview for module-federation-docs ready!

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 12, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@0822d55

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@0822d55

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@0822d55

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/@module-federation/data-prefetch@0822d55

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@0822d55

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@0822d55

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@0822d55

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@0822d55

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@0822d55

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@0822d55

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@0822d55

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@0822d55

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@0822d55

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@0822d55

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@0822d55

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@0822d55

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@0822d55

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@0822d55

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@0822d55

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@0822d55

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@0822d55

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@0822d55

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@0822d55

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@0822d55

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@0822d55

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@0822d55

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@0822d55

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@0822d55

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@0822d55

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@0822d55

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@0822d55

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@0822d55

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@0822d55

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@0822d55

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@0822d55

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@0822d55

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@0822d55

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@0822d55

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/@module-federation/inject-external-runtime-core-plugin@0822d55

commit: 0822d55

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2026

Bundle Size Report

16 package(s) changed, 24 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/bridge-react 358.4 kB +586 B (+0.2%) 1.3 kB -4 B (-0.3%)
@module-federation/bridge-vue3 142.3 kB +1.6 kB (+1.1%) 21.8 kB +278 B (+1.3%)
@module-federation/cli 26.7 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/devtools 473.2 kB -4551619 B (-90.4%) 3.9 kB +3.9 kB (+∞%)
@module-federation/enhanced 810.8 kB no change 712 B no change
@module-federation/managers 69.9 kB no change 334 B no change
@module-federation/manifest 138.4 kB no change 182 B no change
@module-federation/metro-plugin-rnc-cli 0 B no change 314 B no change
@module-federation/modern-js 185.9 kB +2.2 kB (+1.2%) 1.2 kB no change
@module-federation/modern-js-v3 177.1 kB +1.8 kB (+1.0%) 872 B no change
@module-federation/node 189.2 kB no change 217 B no change
@module-federation/runtime 19.5 kB +13 B (+0.1%) 616 B no change
@module-federation/runtime-core 251.3 kB +1.9 kB (+0.8%) 477 B no change
@module-federation/storybook-addon 76.5 kB no change 100 B no change
@module-federation/utilities 110.6 kB no change 328 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/bridge-react 17.1 kB +41 B (+0.2%) 17.6 kB +31 B (+0.2%)
@module-federation/bridge-vue3 16.6 kB +230 B (+1.4%) 16.4 kB +214 B (+1.3%)
@module-federation/cli 2.3 kB -32 B (-1.4%) 2.3 kB -32 B (-1.4%)
@module-federation/core 1.1 kB -30 B (-2.7%) 1.0 kB -29 B (-2.7%)
@module-federation/devtools 20.8 kB n/a 20.8 kB n/a
@module-federation/enhanced 5.9 kB -56 B (-0.9%) 5.9 kB -56 B (-0.9%)
@module-federation/managers 2.4 kB -25 B (-1.0%) 2.4 kB -25 B (-1.0%)
@module-federation/manifest 6.2 kB -36 B (-0.6%) 6.2 kB -36 B (-0.6%)
@module-federation/metro-plugin-rnc-cli 411 B -24 B (-5.5%) 411 B -24 B (-5.5%)
@module-federation/modern-js 4.7 kB +68 B (+1.4%) 4.7 kB +68 B (+1.4%)
@module-federation/modern-js-v3 4.5 kB +63 B (+1.4%) 4.5 kB +63 B (+1.4%)
@module-federation/node 9.2 kB -27 B (-0.3%) 9.2 kB -27 B (-0.3%)
@module-federation/runtime 625 B no change 625 B no change
@module-federation/runtime-core 13.6 kB +242 B (+1.8%) 13.4 kB +221 B (+1.6%)
@module-federation/storybook-addon 1.9 kB -23 B (-1.2%) 1.7 kB -23 B (-1.3%)
@module-federation/utilities 2.6 kB -30 B (-1.1%) 2.6 kB -30 B (-1.1%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 19.2 kB +187 B (+1.0%) 20.3 kB +163 B (+0.8%) +1.0 kB -24 B

Total dist (raw): 6.30 MB (-4543340 B (-40.8%))
Total ESM gzip: 73.2 kB (+4.2 kB (+6.1%))
Total web bundle (gzip): 180.2 kB (+21.2 kB (+13.3%))
Total node bundle (gzip): 180.7 kB (+21.1 kB (+13.2%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.5 kB (no change)
Tracked ./bundler node bundle (gzip): 4.5 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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: cdf288c158

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +424 to +425
modernjsConfig.source?.enableAsyncEntry !== true &&
targetMFConfig.experiments?.asyncStartup !== false
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Base asyncStartup default on resolved async-entry setting

The new guard ties experiments.asyncStartup to the raw modernjsConfig.source?.enableAsyncEntry value, but this plugin later defaults enableAsyncEntry to true for Rspack in api.config. As a result, two effectively equivalent configs behave differently: leaving enableAsyncEntry unset turns asyncStartup on, while explicitly setting enableAsyncEntry: true turns it off. That means projects already pinning enableAsyncEntry: true will silently miss the new default async startup path.

Useful? React with 👍 / 👎.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: a7d2ced

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@module-federation/modern-js 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

@2heal1 2heal1 merged commit 3d8b09c into main Mar 13, 2026
25 checks passed
@2heal1 2heal1 deleted the feat/rspack-async-startup branch March 13, 2026 09:17
@2heal1 2heal1 mentioned this pull request Mar 14, 2026
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.

2 participants