From 24aacce1302ebda02dd06bb104993cc7ec29bffd Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Mon, 15 May 2017 17:38:36 +0100 Subject: [PATCH] docs(@angular/cli): document service worker support --- docs/documentation/build.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/documentation/build.md b/docs/documentation/build.md index 8feb4e20017e..2b3380cda03f 100644 --- a/docs/documentation/build.md +++ b/docs/documentation/build.md @@ -82,6 +82,20 @@ Flag | `--dev` | `--prod` - Replaces `process.env.NODE_ENV` in modules with the `production` value (this is needed for some libraries, like react). - Runs UglifyJS on the code. +### Service Worker + +There is experimental service worker support for production builds available in the CLI. +To enable it, run the following commands: +``` +npm install @angular/service-worker --save +ng set apps.0.serviceWorker=true +``` + +On `--prod` builds a service worker manifest will be created and loaded automatically. +Remember to disable the service worker while developing to avoid stale code. + +Note: service worker support is experimental and subject to change. + ## Options
aot