webpack: precache oss-licenses.json

This works around the oss-licenses.json file not being picked up by
the workbox plugin.

Closes: https://github.com/pybricks/pybricks-code/issues/1245
This commit is contained in:
David Lechner
2022-11-19 16:58:27 -06:00
committed by David Lechner
parent 61098453c7
commit efec127b8e
+4
View File
@@ -726,6 +726,10 @@ module.exports = function (webpackEnv) {
// to make lazy-loading failure scenarios less likely.
// See https://github.com/cra-template/pwa/issues/13#issuecomment-722667270
maximumFileSizeToCacheInBytes: 10 * 1024 * 1024,
additionalManifestEntries: [
// FIXME: this path should have a hash
{ url: 'static/oss-licenses.json', revision: null },
],
}),
// TypeScript type checking
useTypeScript &&