Created
December 24, 2016 01:11
-
-
Save davidgilbertson/26014501509d9c400da7767effd05e74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swPrecache.write(path.resolve(__dirname, `../public/service-worker.js`), { | |
cacheId: `know-it-all`, | |
filename: `service-worker.js`, | |
stripPrefix: `public/`, | |
staticFileGlobs: [ | |
`public/app.*.js`, // don't include the polyfills version | |
`public/*.{html,ico,json,png}`, | |
], | |
dontCacheBustUrlsMatching: [ | |
/\.(js|json)$/, // I'm cache busting js and json files myself | |
], | |
skipWaiting: true, | |
}, (err) => { | |
if (err) { | |
reject(err); | |
} else { | |
resolve(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment