diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 8efff0b96c7..eddca1b0707 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -714,6 +714,10 @@ module.exports = function (webpackEnv) { swSrc, dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./, exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/], + // Bump up the default maximum size (2mb) that's precached, + // to make lazy-loading failure scenarios less likely. + // See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270 + maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, }), // TypeScript type checking useTypeScript &&