-
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
Angular compilation errors when using Module Federation with nested tsconfig paths #20284
Closed
1 of 4 tasks
Labels
Comments
The issue seems to go away if the paths are reordered so that the subpaths are first. Though |
Coly010
added a commit
that referenced
this issue
May 7, 2024
…reading from tsconfig paths #20284 (#23212) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> When using nested projects (note: not secondary entry points), the `shareWorkspaceLibraries` needs to order the nested projects first for webpack to resolve the import path aliases correctly. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Ensure nested projects are ordered first when reading tsconfig path aliases ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #20284
FrozenPandaz
pushed a commit
that referenced
this issue
May 7, 2024
…reading from tsconfig paths #20284 (#23212) <!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> ## Current Behavior <!-- This is the behavior we have today --> When using nested projects (note: not secondary entry points), the `shareWorkspaceLibraries` needs to order the nested projects first for webpack to resolve the import path aliases correctly. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Ensure nested projects are ordered first when reading tsconfig path aliases ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #20284 (cherry picked from commit bf90604)
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current Behavior
Using a tsconfig path that is nested within another path with Module Federation in an Angular application will error.
Without Module Federation being used, the application will compile without issues.
Here is an example of a nested tsconfig path:
Expected Behavior
It should compile successfully.
GitHub Repo
https://github.com/gremlin896/mf-nested-paths-issue-repro
Steps to Reproduce
nx serve host
ornx build host
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
The repro repository was created like so:
npx create-nx-workspace acme --preset=apps
nx g @nx/angular:host host --remotes=shop,cart,about
nx g @nx/angular:library --name=shared --projectNameAndRootFormat=as-provided
nx g @nx/angular:library --name=components --directory=shared --projectNameAndRootFormat=derived
Following this, the generated components from the two libraries were imported to the
AppComponent
ofhost
and used in the template.The text was updated successfully, but these errors were encountered: