Is it possible to generate environment object asynchronously?
Reason: I would like to have available commit hash in my application. Idea is to use environment.ts
file. However to obtain current commit hash I need asynchronous call (eg. using git-rev).
I tried to inject variable from environment variables using process.env: $ VERSION=123 ng serve
declare var process: any;
export const environment = {
production: false,
version: process.env.VERSION
};
But this results in undefined version.