mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 09:36:27 +00:00
webpack: fix main.[hash].js not cached
This caused updates to not work if main.js was not in the browser cache since it was being excluded from the service worker. Issue: https://github.com/pybricks/support/issues/689
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
- Fixed `main.[hash].js` not cached ([support#689]).
|
||||
|
||||
[support#689]: https://github.com/pybricks/support/issues/689
|
||||
|
||||
## [2.0.0-beta.4] - 2022-07-28
|
||||
|
||||
### Added
|
||||
|
||||
@@ -716,12 +716,10 @@ module.exports = function (webpackEnv) {
|
||||
new WorkboxWebpackPlugin.InjectManifest({
|
||||
swSrc,
|
||||
dontCacheBustURLsMatching: /\.[0-9a-f]{8}\./,
|
||||
// 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: 2 * 1024 * 1024,
|
||||
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
|
||||
}),
|
||||
// TypeScript type checking
|
||||
useTypeScript &&
|
||||
|
||||
Reference in New Issue
Block a user