Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Coly010
Copy link
Contributor

@Coly010 Coly010 commented Dec 18, 2025

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

@Coly010 Coly010 requested a review from a team as a code owner December 18, 2025 15:10
@Coly010 Coly010 requested a review from jaysoo December 18, 2025 15:10
@Coly010 Coly010 self-assigned this Dec 18, 2025
@vercel
Copy link

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Dec 18, 2025 3:16pm

@netlify
Copy link

netlify bot commented Dec 18, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 7ac4c77
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6944196674ef09000837c0ec
😎 Deploy Preview https://deploy-preview-33920--nx-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.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Dec 18, 2025

View your CI Pipeline Execution ↗ for commit 7ac4c77

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 26m 25s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 22s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-18 15:41:59 UTC

@Coly010 Coly010 merged commit 1bc16c8 into master Dec 18, 2025
21 checks passed
@Coly010 Coly010 deleted the mf/webpack-ts-proj-setup branch December 18, 2025 15:42
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
@github-actions
Copy link
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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@nx/module-federation sample doesn't work.

3 participants