Skip to content

Comments

fix(entry): allow empty entry when module federation is used#6602

Merged
chenjiahan merged 3 commits intomainfrom
entry_mf_1118
Nov 18, 2025
Merged

fix(entry): allow empty entry when module federation is used#6602
chenjiahan merged 3 commits intomainfrom
entry_mf_1118

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Nov 18, 2025

Summary

Skip the empty entry validation when module federation plugin is detected. A MF app is allowed to expose remote modules without providing any entry module.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings November 18, 2025 05:52
@netlify
Copy link

netlify bot commented Nov 18, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit edeb93d
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/691c165ce990f600083ae426
😎 Deploy Preview https://deploy-preview-6602--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 64 (🔴 down 3 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a specific use case for Module Federation remote-only applications by allowing empty entry configurations when the ModuleFederationPlugin is detected. Previously, Rsbuild would throw an error if no entry module was found.

Key Changes:

  • Modified entry validation logic to detect Module Federation plugin usage
  • Added logic to set empty entry object when Module Federation is used without explicit entries
  • Added e2e test case for Module Federation remote-only application

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/core/src/plugins/entry.ts Enhanced entry validation to detect ModuleFederationPlugin and allow empty entry configuration when it's present
e2e/cases/module-federation/v1-remote-only/src/Button.tsx Added test component to be exposed via Module Federation
e2e/cases/module-federation/v1-remote-only/rsbuild.config.ts Added configuration for remote-only Module Federation test case
e2e/cases/module-federation/v1-remote-only/moduleFederation.config.ts Added Module Federation configuration exposing the Button component
e2e/cases/module-federation/v1-remote-only/index.test.ts Added e2e tests for dev and build modes of remote-only MF application

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit f18dc53 into main Nov 18, 2025
12 checks passed
@chenjiahan chenjiahan deleted the entry_mf_1118 branch November 18, 2025 06:58
@chenjiahan chenjiahan mentioned this pull request Nov 18, 2025
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.

1 participant