From 8552bc96f9784579222e2bc045e78d6d7511300e Mon Sep 17 00:00:00 2001 From: userquin Date: Fri, 20 Jan 2023 19:37:37 +0100 Subject: [PATCH] chore: update pwa module configuration --- modules/pwa/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/pwa/index.ts b/modules/pwa/index.ts index 4d6df7ce..ddffb5aa 100644 --- a/modules/pwa/index.ts +++ b/modules/pwa/index.ts @@ -112,11 +112,11 @@ export default defineNuxtModule({ next() } nuxt.hook('vite:serverCreated', (viteServer, { isServer }) => { - if (isServer || !tauriPlatform) + if (isServer) return viteServer.middlewares.stack.push({ route: webManifest, handle: emptyHandle }) - if (webmanifests) { + if (webmanifests && !tauriPlatform) { Object.keys(webmanifests).forEach((wm) => { viteServer.middlewares.stack.push({ route: `${nuxt.options.app.baseURL}manifest-${wm}.webmanifest`, @@ -141,6 +141,7 @@ export default defineNuxtModule({ } else { nuxt.hook('nitro:config', async (nitroConfig) => { + // /manifest.webmanifest added on nuxt config file if (!tauriPlatform) return