Skip to content

Commit 9a67580

Browse files
author
pooya parsa
committed
fix(workbox): use NetworkFirst for dev
1 parent 9d43f3b commit 9a67580

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/workbox/lib/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ function getOptions (moduleOptions) {
4242
if (!options.assetsURLPattern) {
4343
options.assetsURLPattern = joinUrl(options.publicPath, HMRRegex)
4444
}
45-
if (options.cacheAssets && !this.options.dev) {
45+
if (options.cacheAssets) {
4646
options.runtimeCaching.push({
4747
urlPattern: options.assetsURLPattern,
48-
handler: 'CacheFirst'
48+
handler: this.options.dev ? 'NetworkFirst' : 'CacheFirst'
4949
})
5050
}
5151

0 commit comments

Comments
 (0)