angular-cn/aio/src
Georgios Kalpakas 90bc5b221b fix(aio): only register ServiceWorker in production mode
Since abb36e3cb, we no longer rely on the cli to set up ServiceWorker, but do it
manually as part of `yarn build`. When using `ng serve`, registering the
ServiceWorker fails, because we haven't created `ngsw-manifest.json` nor copied
`worker-basic.min.js` into dist.

This commit works around this, by only registering the service worker in
production mode (which is what the cli does too).

Caveat:
It is not possible to enable ServiceWorker with `ng serve`/`yarn start` and
using the `--prod` flag will try to register it, but fail because the necessary
files (`ngsw-manifest.json` and `worker-basic.min.js`) will not be available.
(As a work-around, you can use `yarn build` and serve the files in `dist/` with
`yarn http-server -- dist -p 4200`.)
2017-05-12 14:17:27 +01:00
..
app docs(aio): image sweep (#16609) 2017-05-09 15:53:32 -07:00
assets refactor(aio): move content-related images to `content/images/` 2017-04-27 10:14:32 +01:00
environments
styles fix(aio): style TOC scrollbar similar to other scrollbars 2017-05-10 15:02:44 +01:00
testing feat(aio): revise Docs page; docs version selector in sidenav 2017-04-28 09:40:39 +01:00
NOTES.md build(aio): rename `src/content` to `src/generated` 2017-05-03 13:40:46 -07:00
favicon.ico
index.html feat(aio): cache external resources in the ServiceWorker 2017-04-27 10:14:32 +01:00
main.ts fix(aio): only register ServiceWorker in production mode 2017-05-12 14:17:27 +01:00
polyfills.ts
pwa-manifest.json fix(aio): better styling for "disabled JavaScript" message (#16170) 2017-04-19 22:34:04 -05:00
styles.scss
test-specs.ts perf(aio): improve unit test rebuild time 2017-04-24 14:30:16 +01:00
test.ts perf(aio): improve unit test rebuild time 2017-04-24 14:30:16 +01:00
tsconfig.app.json perf(aio): improve unit test rebuild time 2017-04-24 14:30:16 +01:00
tsconfig.spec.json build(aio): update project config for @angular/cli v1.0.0 2017-03-27 11:55:26 -07:00
typings.d.ts build(aio): update project config for @angular/cli v1.0.0 2017-03-27 11:55:26 -07:00