Skip to content

docs: Update hmr story. #10500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/documentation/stories/configure-hmr.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,29 @@ 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:

```json
"scripts": {
...
"hmr": "ng serve --hmr -e=hmr"
"hmr": "ng serve --configuration hmr"
}
```

Expand Down