From 661effcc0363a9dd743d4865e91a1a2c4390784a Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Sat, 28 Oct 2017 12:51:36 +0100 Subject: [PATCH] docs: add HMR no AOT note Partially address #8234 --- docs/documentation/stories/configure-hmr.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/documentation/stories/configure-hmr.md b/docs/documentation/stories/configure-hmr.md index c00352e6b346..33d2942c1c65 100644 --- a/docs/documentation/stories/configure-hmr.md +++ b/docs/documentation/stories/configure-hmr.md @@ -55,7 +55,7 @@ Update `.angular-cli.json` by adding the new environment the existing environmen Run `ng serve` with the flag `--hmr -e=hmr` to enable hmr and select the new environment: ```bash -ng serve --hmr -e=hmr +ng serve --hmr -e=hmr --no-aot ``` Create a shortcut for this by updating `package.json` and adding an entry to the script object: @@ -63,10 +63,12 @@ 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 --hmr -e=hmr --no-aot" } ``` +Note: you cannot use HMR when AOT is turned on, so you must force it off with `--no-aot`. + ### Add dependency for @angularclass/hmr and configure app