-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(module-federation): ensure incorrect tsconfig path mappings are not used #21391 #21416
fix(module-federation): ensure incorrect tsconfig path mappings are not used #21391 #21416
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 8704c2a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
4dfa770
to
6a4f598
Compare
if (tsPathMappings) { | ||
return tsPathMappings; | ||
if (tsPathMappings.has(tsConfigPath)) { | ||
return tsPathMappings.get(tsConfigPath); | ||
} | ||
|
||
tsConfig ??= readTsConfiguration(tsConfigPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to either not cache tsConfig or cache it by path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is caching by path now? Unless you see some issue with it?
it’ll take the path to the tsconfig from the build process and use that to build and entry in the cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait I see it. Yes good catch
6a4f598
to
4dec066
Compare
4dec066
to
8704c2a
Compare
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. |
Current Behavior
We cache the TS Path Mappings when building MF apps. However, if multiple builds occur in a single process, an incorrect set of mappings can be used as they are cached.
Expected Behavior
Make the cache more robust and based on the actual tsconfig path used.
Related Issue(s)
Fixes #21391