Skip to content

Commit 661effc

Browse files
committed
docs: add HMR no AOT note
Partially address #8234
1 parent d2e22b2 commit 661effc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/documentation/stories/configure-hmr.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,20 @@ Update `.angular-cli.json` by adding the new environment the existing environmen
5555
Run `ng serve` with the flag `--hmr -e=hmr` to enable hmr and select the new environment:
5656

5757
```bash
58-
ng serve --hmr -e=hmr
58+
ng serve --hmr -e=hmr --no-aot
5959
```
6060

6161
Create a shortcut for this by updating `package.json` and adding an entry to the script object:
6262

6363
```json
6464
"scripts": {
6565
...
66-
"hmr": "ng serve --hmr -e=hmr"
66+
"hmr": "ng serve --hmr -e=hmr --no-aot"
6767
}
6868
```
6969

70+
Note: you cannot use HMR when AOT is turned on, so you must force it off with `--no-aot`.
71+
7072

7173
### Add dependency for @angularclass/hmr and configure app
7274

0 commit comments

Comments
 (0)