From 16de217d1f0782dba09bf1021ed8691f11f272d6 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 24 Jan 2023 00:39:52 +0000 Subject: [PATCH] fix: pwa start url updating --- next.config.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/next.config.js b/next.config.js index 59570fe2..4d7c76a8 100644 --- a/next.config.js +++ b/next.config.js @@ -10,8 +10,13 @@ const cache = require("next-pwa/cache") const withPWA = require("next-pwa")({ dest: "public", publicExcludes: ["*"], - dynamicStartUrl: false, runtimeCaching: [ + { + urlPattern: ({ request }) => { + return request.headers.get("x-middleware-prefetch") + }, + handler: "NetworkOnly", + }, { urlPattern: ({ url }) => { return /\/ipfs\/([^/?#]+)$/.test(url.toString()) @@ -39,12 +44,6 @@ const withPWA = require("next-pwa")({ }, }, }, - { - urlPattern: ({ request }) => { - return request.headers.get("x-middleware-prefetch") - }, - handler: "NetworkOnly", - }, // @ts-ignore ...cache, ],