Skip to content

Commit

Permalink
fix(workbox): use NetworkFirst for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pooya parsa committed May 6, 2019
1 parent 9d43f3b commit 9a67580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/workbox/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})
}

Expand Down

0 comments on commit 9a67580

Please sign in to comment.