diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 3eb61cbb4..3a67c4893 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -171,11 +171,9 @@ const BUILD_CONFIG = { navigateFallback: "", runtimeCaching: [ { - urlPattern: ({ request, url }) => { - const sameOrigin = - new URL(request.url).origin === new URL(url).origin; - const isApi = request.url.includes("api.monkeytype.com"); - return sameOrigin && !isApi; + urlPattern: (options) => { + const isApi = options.url.hostname === "api.monkeytype.com"; + return options.sameOrigin && !isApi; }, handler: "NetworkFirst", options: {},