From efec127b8eaef4be17a2ecb9095627212459f4ce Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 19 Nov 2022 16:49:51 -0600 Subject: [PATCH] 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 --- config/webpack.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/webpack.config.js b/config/webpack.config.js index 27b0fcca..4dcb8001 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -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 &&