Skip to content

Commit a33e890

Browse files
filipesilvadond2clouds
authored andcommitted
docs(@angular/cli): document service worker support (angular#6324)
1 parent 1c630e8 commit a33e890

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/documentation/build.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,20 @@ Flag | `--dev` | `--prod`
8282
- Replaces `process.env.NODE_ENV` in modules with the `production` value (this is needed for some libraries, like react).
8383
- Runs UglifyJS on the code.
8484

85+
### Service Worker
86+
87+
There is experimental service worker support for production builds available in the CLI.
88+
To enable it, run the following commands:
89+
```
90+
npm install @angular/service-worker --save
91+
ng set apps.0.serviceWorker=true
92+
```
93+
94+
On `--prod` builds a service worker manifest will be created and loaded automatically.
95+
Remember to disable the service worker while developing to avoid stale code.
96+
97+
Note: service worker support is experimental and subject to change.
98+
8599
## Options
86100
<details>
87101
<summary>aot</summary>

0 commit comments

Comments
 (0)