Skip to content
Permalink
Browse files
fix(workbox): use NetworkFirst for dev
  • Loading branch information
pooya parsa committed May 6, 2019
1 parent 9d43f3b commit 9a67580badc5f3d80fc1d56f8b5a44dc4aebf60b
Showing 1 changed file with 2 additions and 2 deletions.
@@ -42,10 +42,10 @@ function getOptions (moduleOptions) {
if (!options.assetsURLPattern) {
options.assetsURLPattern = joinUrl(options.publicPath, HMRRegex)
}
if (options.cacheAssets && !this.options.dev) {
if (options.cacheAssets) {
options.runtimeCaching.push({
urlPattern: options.assetsURLPattern,
handler: 'CacheFirst'
handler: this.options.dev ? 'NetworkFirst' : 'CacheFirst'
})
}

0 comments on commit 9a67580

Please sign in to comment.