webpack: ignore warning about main.js size

This commit is contained in:
David Lechner
2022-06-01 11:20:12 -05:00
parent 6386c90068
commit 9cdd102477
+3 -2
View File
@@ -716,11 +716,12 @@ module.exports = function (webpackEnv) {
new WorkboxWebpackPlugin.InjectManifest({
swSrc,
dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/],
// REVISIT: main entry point should be chunked instead of ignored
exclude: [/\.map$/, /asset-manifest\.json$/, /LICENSE/, /static\/js\/main\.\w+\.js$/],
// 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,
maximumFileSizeToCacheInBytes: 2 * 1024 * 1024,
}),
// TypeScript type checking
useTypeScript &&