You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently having a situation where i'm using the environment.ts file from my app into more than one library and those libraries are used in this app . which was going fine with angular 8 , but now it's showing a circular dep error . Is there a way to get a round that ?
in my tsconfig.json file i have this code added to paths "@global-env/*": ["apps/web/src/environments/*"],
i have a library called core-data-access where i call the environment import { environment } from '@global-env/environment';
then i import some services from the core-data-access library in my web app
The text was updated successfully, but these errors were encountered:
Abdallah-khalil
changed the title
Circular Dep error when calling environment.ts from with a library
Circular Dep error when calling environment.ts from within a library
Apr 12, 2020
I would extract the shared environments to a separate util library. You shouldn't be mapping subdirectories of the web app as another library.
Nx will resolve your mapping in your tsconfig.json back to the web app, so you essentially end up with web -> core-data-access -> web dependency chain.
@jaysoo Hi. Could you suggest how one can do that? Angular takes care of replacing environment.ts with environment.prod or dev.ts depending on build type and I cannot understand how we would do that when building a library
I'm currently having a situation where i'm using the environment.ts file from my app into more than one library and those libraries are used in this app . which was going fine with angular 8 , but now it's showing a circular dep error . Is there a way to get a round that ?
in my
tsconfig.json
file i have this code added to paths"@global-env/*": ["apps/web/src/environments/*"],
i have a library called
core-data-access
where i call the environmentimport { environment } from '@global-env/environment';
then i import some services from the
core-data-access
library in myweb
appThe text was updated successfully, but these errors were encountered: