My plan was to use the NgRx related modules (store, effects, devtools, etc.) in a library module, not in the app-module.
The NgRx related modules are imported into the libs/.../shell-module, which in turn is imported into the app-module.
The problem
I would like to provide the environment.production variable in my libs, but I have no idea how to get it in the shell-module without using a relative/absolute import path.
libs/.../shell.module.ts:
import { environment } from '../../../../../../../apps/test-app/src/environments/environment';
imports:[
...
!environment.production ? StoreDevtoolsModule.instrument() : []
...
]
Questions
Is it not possible to resolve the environment.production variable in an Angular module?
I know how to inject stuff into components, but how do you inject it into modules?
The .forRoot() config trick didn't work, because the imports array in the module decorator is out of scope of the module class.is there another way to do this without tight coupling the environment.ts file and my libs modules?
Defining an '@' path for environment.ts in tsconfig.json, and then importing it into the module still counts as tight coupling ... right?