From 530ee39ff05448cfd895b09f6ff95ffeb6f5e9f4 Mon Sep 17 00:00:00 2001 From: Mike Brocchi Date: Fri, 27 Apr 2018 14:58:13 -0700 Subject: [PATCH] docs: Update hmr story. --- docs/documentation/stories/configure-hmr.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/documentation/stories/configure-hmr.md b/docs/documentation/stories/configure-hmr.md index daa0c3ca56e6..30c8b2e6aa8e 100644 --- a/docs/documentation/stories/configure-hmr.md +++ b/docs/documentation/stories/configure-hmr.md @@ -41,21 +41,21 @@ export const environment = { ``` -Update `.angular-cli.json` by adding the new environment the existing environments object: +Update `angular.json` to include an hmr environment as explained [here](./application-environments) and add a configuration within serve to enable hmr. ```json -"environmentSource": "environments/environment.ts", -"environments": { - "dev": "environments/environment.ts", - "hmr": "environments/environment.hmr.ts", - "prod": "environments/environment.prod.ts" -}, + "serve": { + "configuration": { + ... + "hmr": true + } + } ``` -Run `ng serve` with the flag `--hmr -e=hmr` to enable hmr and select the new environment: +Run `ng serve` with the flag `--configuration hmr` to enable hmr and select the new environment: ```bash -ng serve --hmr -e=hmr +ng serve --configuration hmr ``` Create a shortcut for this by updating `package.json` and adding an entry to the script object: @@ -63,7 +63,7 @@ Create a shortcut for this by updating `package.json` and adding an entry to th ```json "scripts": { ... - "hmr": "ng serve --hmr -e=hmr" + "hmr": "ng serve --configuration hmr" } ```