fix(react): set up module federation with webpack and ts soln correctly #31029#33920
Merged
fix(react): set up module federation with webpack and ts soln correctly #31029#33920
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit 7ac4c77
☁️ Nx Cloud last updated this comment at |
jaysoo
approved these changes
Dec 18, 2025
jaysoo
pushed a commit
that referenced
this pull request
Dec 19, 2025
#31029 (#33920) ## Current Behavior When generating a React Module Federation remote with webpack bundler in a TypeScript Solution setup, the generator incorrectly sets the production webpack config path in the project configuration. Additionally, the sourceRoot property is not being set in package.json for TS Solution setups, which causes issues with module federation's ability to locate source files correctly. ## Expected Behavior When using a TypeScript Solution setup: - The production webpack config should not be explicitly set in the build target's production configuration (it will be inferred correctly) - The sourceRoot property should be set in package.json under the nx configuration to properly identify the project's source directory - The typecheck target should be added as a dependency for both build and serve targets ## Related Issue(s) Fixes #31029
Contributor
|
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Current Behavior
When generating a React Module Federation remote with webpack bundler in a TypeScript
Solution setup, the generator incorrectly sets the production webpack config path in the
project configuration. Additionally, the sourceRoot property is not being set in
package.json for TS Solution setups, which causes issues with module federation's ability
to locate source files correctly.
Expected Behavior
When using a TypeScript Solution setup:
production configuration (it will be inferred correctly)
properly identify the project's source directory
Related Issue(s)
Fixes #31029