App Router: RSC Flight plugins #3807
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces a variety of updates across multiple files, focusing on improving dependency management, simplifying configurations, and enhancing module federation functionality. The changes include updates to scripts and configurations, removal of unused code, and enhancements to loaders and plugins.
Dependency and Configuration Updates:
package.json
scripts inapps/next-app-router/next-app-router-4001
to include new commands likewatch
,patch-flight-plugin
, andpostinstall
. These changes streamline the development workflow and add support for patching plugins..cursor/rules/nx-rules.mdc
to reflect the use of Nx 21.0.3 and thepnpm
package manager.Code Cleanup:
console.log
statements from files such aspage.tsx
,router-test.tsx
, andglobal-nav.tsx
, improving code readability. [1] [2] [3]Module Federation Enhancements:
modules
export inpackages/enhanced/src/index.ts
to dynamically provide shared modules, improving flexibility.EmbedFederationRuntimePlugin
by removing unused options and updating logic for chunk runtime checks. [1] [2] [3]Loader and Plugin Improvements:
next-flight-loader
inpackages/nextjs-mf/src/loaders/next-flight-loader.ts
, adding advanced handling for React Server Components (RSC) and barrel optimizations.RscManifestInterceptPlugin
and its references, streamlining the plugin architecture. [1] [2] [3]Miscellaneous:
resolveMatchedConfigs
function inpackages/enhanced/src/lib/sharing/resolveMatchedConfigs.ts
to simplify key generation logic.resolveShare
inruntimePlugin.ts
to track package resolution in client environments.Related Issue
Types of changes
Checklist