Skip to content

Instantly share code, notes, and snippets.

@glauberramos
Created October 10, 2017 02:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glauberramos/aa016e514e860cf9de16e2adbe41dd8e to your computer and use it in GitHub Desktop.
Save glauberramos/aa016e514e860cf9de16e2adbe41dd8e to your computer and use it in GitHub Desktop.
Service worker application shell
importScripts('https://unpkg.com/workbox-sw@2.0.3/build/importScripts/workbox-sw.prod.v2.0.3.js');
const fileManifest = [
{
"url": "manifest.json",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "cloudinary.png",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "cloudinary_logo.png",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "_app.component.ts",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "_main.ts",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "index.html",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "sw.js",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
},
{
"url": "systemjs.config.js",
"revision": "df8c1f88f48f4af912acb1e6a8053bfe"
}
];
const workboxSW = new self.WorkboxSW();
workboxSW.precache(fileManifest);
workboxSW.router.registerNavigationRoute("/index.html");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment