How To Scope Libraries Within Angular Micro Frontend With Nx #32841
Unanswered
EddyFreeman
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Nx to create micro frontends in Angular and so far my folder structure looks like this (A lot of files have been omitted for clarity):
The
apps
folder contains the 3 micro frontends. Thelibs
folder contains all components that the 3 micro frontends can use andtsconfig.base.json
contains the mappings.Now i have another
libs
folder under thebank
micro frontend. All components within this folder must only be accessible inside thebank
micro frontend. Other micro frontends should not be able to access the components in this folder. It is internal to the bank micro frontend only.After generating a library in the bank's
libs
folder using the nx command ex:nx g @nx/angular:library --directory=libs/invoice --buildable
i realized that a path is inserted into the
tsconfig.base.json
ex:The problem is the paths inside
tsconfig.base.json
are accessible to all other micro frontends.Where should i move this path to so that only the
bank
micro frontend can access theinvoice
library?Beta Was this translation helpful? Give feedback.
All reactions