-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
We would like to be able to change the environment at runtime. Currently, this is not possible, as the environment.ts
file gets compiled into the main.bundle.js
with the rest of the code. Instead, the dist should have a separate environment.js
file, so that it can be replaced at runtime.
Setting the environment at runtime is a very important feature for release pipelines. It does not make sense to build an artifact to test on a lower environment, and then have to build a new artifact for production. Being able to pass an artifact off to the higher environment provides assurance that you are releasing the same thing that you tested.
Versions.
angular-cli: 1.0.0-beta.15
node: 6.6.0
os: darwin x64
Repro steps.
ng build
Notice that the dist
directory does not have a file dedicated to environment config.