Skip to content

App Router: RSC Flight plugins #3807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 30, 2025
Merged

Conversation

ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented May 30, 2025

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:

  • Updated package.json scripts in apps/next-app-router/next-app-router-4001 to include new commands like watch, patch-flight-plugin, and postinstall. These changes streamline the development workflow and add support for patching plugins.
  • Updated .cursor/rules/nx-rules.mdc to reflect the use of Nx 21.0.3 and the pnpm package manager.

Code Cleanup:

  • Removed unused imports and console.log statements from files such as page.tsx, router-test.tsx, and global-nav.tsx, improving code readability. [1] [2] [3]

Module Federation Enhancements:

  • Added a modules export in packages/enhanced/src/index.ts to dynamically provide shared modules, improving flexibility.
  • Simplified the EmbedFederationRuntimePlugin by removing unused options and updating logic for chunk runtime checks. [1] [2] [3]

Loader and Plugin Improvements:

  • Introduced a custom next-flight-loader in packages/nextjs-mf/src/loaders/next-flight-loader.ts, adding advanced handling for React Server Components (RSC) and barrel optimizations.
  • Removed the RscManifestInterceptPlugin and its references, streamlining the plugin architecture. [1] [2] [3]

Miscellaneous:

  • Refactored the resolveMatchedConfigs function in packages/enhanced/src/lib/sharing/resolveMatchedConfigs.ts to simplify key generation logic.
  • Added a conditional log for resolveShare in runtimePlugin.ts to track package resolution in client environments.

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.

Copy link

changeset-bot bot commented May 30, 2025

⚠️ No Changeset found

Latest commit: 39ddca4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy changed the title Flight plugins App Router: RSC Flight plugins May 30, 2025
@ScriptedAlchemy ScriptedAlchemy marked this pull request as ready for review May 30, 2025 07:55
@ScriptedAlchemy ScriptedAlchemy merged commit f7caf3b into app-router-share-filter May 30, 2025
9 of 10 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the flight-plugins branch May 30, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant