From 39ac3eb39747f5d305316dbd701e9156817c8e2e Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 23 Feb 2026 17:00:09 +0200 Subject: [PATCH] fix: webpack config upgrate cross origin requests --- webpack.config.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 8768d753f..796a7a5f0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -224,7 +224,21 @@ module.exports = (env, argv) => ({ new WorkboxPlugin.GenerateSW({ maximumFileSizeToCacheInBytes: 20000000, clientsClaim: true, - skipWaiting: true + skipWaiting: true, + runtimeCaching: [ + { + urlPattern: /^https:\/\/.*/, + handler: 'NetworkFirst', + options: { + cacheName: 'cross-origin-requests', + networkTimeoutSeconds: 10, + expiration: { + maxEntries: 200, + maxAgeSeconds: 60 * 60, + }, + }, + }, + ], }), new CopyWebpackPlugin({ patterns: [