Skip to content

Instantly share code, notes, and snippets.

@sumit-gupta91
Created December 14, 2017 08:42
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 sumit-gupta91/20ae00573fdf0b44e031d784fd80e94f to your computer and use it in GitHub Desktop.
Save sumit-gupta91/20ae00573fdf0b44e031d784fd80e94f to your computer and use it in GitHub Desktop.
new SWPrecacheWebpackPlugin({
cacheId: 'rodimus',
filename: 'serviceWorker.js',
staticFileGlobsIgnorePatterns: [/\.map$/, /\.json$/],
importScripts: ['offline/offline.00000002.js'],
dontCacheBustUrlsMatching: /./,
minify: true,
runtimeCaching: [{
urlPattern: new RegExp('/images.treebohotels.com/'),
handler: 'cacheFirst',
}],
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment