Skip to content

Commit 9f65a4a

Browse files
Broccohansl
authored andcommitted
docs: Update hmr story.
1 parent fae46d6 commit 9f65a4a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/documentation/stories/configure-hmr.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,29 +41,29 @@ export const environment = {
4141
```
4242

4343

44-
Update `.angular-cli.json` by adding the new environment the existing environments object:
44+
Update `angular.json` to include an hmr environment as explained [here](./application-environments) and add a configuration within serve to enable hmr.
4545

4646
```json
47-
"environmentSource": "environments/environment.ts",
48-
"environments": {
49-
"dev": "environments/environment.ts",
50-
"hmr": "environments/environment.hmr.ts",
51-
"prod": "environments/environment.prod.ts"
52-
},
47+
"serve": {
48+
"configuration": {
49+
...
50+
"hmr": true
51+
}
52+
}
5353
```
5454

55-
Run `ng serve` with the flag `--hmr -e=hmr` to enable hmr and select the new environment:
55+
Run `ng serve` with the flag `--configuration hmr` to enable hmr and select the new environment:
5656

5757
```bash
58-
ng serve --hmr -e=hmr
58+
ng serve --configuration hmr
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 --configuration hmr"
6767
}
6868
```
6969

0 commit comments

Comments
 (0)