Compile all of your services into a single file and name it something like services.ts
. This file can be compared to a barrel, as it will contain and export all of your services. The contents of the file may resemble this:
export * from './logger/logger';
export * from ...;
etc.
You can now import this consolidated file like so:
import * as Services from 'common/services';
From there, you can access your services using Services.Logger
, or directly import the specific service you need with:
import {Logger} from 'common/services';
Keep in mind that the paths will need to be adjusted based on your setup since this is just an example. For more information on this method, check out this resource.