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
appsfolder contains the 3 micro frontends. Thelibsfolder contains all components that the 3 micro frontends can use andtsconfig.base.jsoncontains the mappings.Now i have another
libsfolder under thebankmicro frontend. All components within this folder must only be accessible inside thebankmicro 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
libsfolder using the nx command ex:nx g @nx/angular:library --directory=libs/invoice --buildablei realized that a path is inserted into the
tsconfig.base.jsonex:The problem is the paths inside
tsconfig.base.jsonare accessible to all other micro frontends.Where should i move this path to so that only the
bankmicro frontend can access theinvoicelibrary?Beta Was this translation helpful? Give feedback.
All reactions