Skip to content

Commit 5867170

Browse files
authored
Increase Workbox's maximumFileSizeToCacheInBytes (#10048)
1 parent aafe8af commit 5867170

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-scripts/config/webpack.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,10 @@ module.exports = function (webpackEnv) {
714714
swSrc,
715715
dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
716716
exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
717+
// Bump up the default maximum size (2mb) that's precached,
718+
// to make lazy-loading failure scenarios less likely.
719+
// See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
720+
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024,
717721
}),
718722
// TypeScript type checking
719723
useTypeScript &&

0 commit comments

Comments
 (0)