diff --git a/aio/content/guide/service-worker-getting-started.md b/aio/content/guide/service-worker-getting-started.md index 8111e2c8b3ea93..cdbe8a5d5e3a9e 100644 --- a/aio/content/guide/service-worker-getting-started.md +++ b/aio/content/guide/service-worker-getting-started.md @@ -61,9 +61,16 @@ ng build # build the app for production; code is in the /dist folde -The Angular development server (`ng serve`) doesn't support service worker applications. -The [`http-server package`](https://www.npmjs.com/package/http-server) from npm does. -You can run it without installing it like this: +To enable service worker support during local development, use the production configuration with the following command: + + + +ng serve --prod + + + +Alternatively, you can use the [`http-server package`](https://www.npmjs.com/package/http-server) from +npm, which supports service worker applications. Run it without installation using: @@ -71,6 +78,8 @@ npx http-server -p 8080 -c-1 dist/<project-name>/browser +This will serve your application with service worker support at http://localhost:8080. + ### Initial load