Skip to content

Instantly share code, notes, and snippets.

@glauberramos glauberramos/sw.js
Created Oct 10, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.