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
It allows you to build libs once, without knowing the apps they are used by or the env they ran in.
What is the intended method of sharing these environment variables across library modules?
Does every library module that need access to environment variables need to be a dynamic module in order to take advantage of environment variables this way?
This will lead to unnecessary chains of dynamic modules.
Ex: AppModule (Needs ENV so it becomes DynamicModule) -> CoreModule (Needs env from AppModule so it becomes a DynamicModule) .. so on and so forth.
Also what would making all modules that need environment values into DynamicModules do to performance?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I read an old thread where it is recommended to share NX environment variables like the following:
Then, you access like:
The justifications are that:
What is the intended method of sharing these environment variables across library modules?
Does every library module that need access to environment variables need to be a dynamic module in order to take advantage of environment variables this way?
This will lead to unnecessary chains of dynamic modules.
Ex: AppModule (Needs ENV so it becomes DynamicModule) -> CoreModule (Needs env from AppModule so it becomes a DynamicModule) .. so on and so forth.
Also what would making all modules that need environment values into DynamicModules do to performance?
Example:
I do not understand why we are forcing any lib modules to be dynamic to access environment variables if these variables are available at compile-time.
Beta Was this translation helpful? Give feedback.
All reactions