I want to reference Azure CI Build.BuildNumber variable in my Angular app, but need a way to inject the build number into the environment file.

I have tried referencing the Azure environment variables but these are not replaced automatically on build.