From d1a1047b10ea5a7ceafd28b3574a324d05543505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Fri, 22 Mar 2024 23:47:36 +0100 Subject: [PATCH] fix: pwa icons not generated when disabled (#691) --- src/plugins/build.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/build.ts b/src/plugins/build.ts index 73fb583e..529200b7 100644 --- a/src/plugins/build.ts +++ b/src/plugins/build.ts @@ -41,12 +41,13 @@ export function BuildPlugin(ctx: PWAPluginContext) { sequential: true, order: ctx.userOptions?.integration?.closeBundleOrder, async handler() { - if (!ctx.viteConfig.build.ssr && !ctx.options.disable) { + if (!ctx.viteConfig.build.ssr) { const pwaAssetsGenerator = await ctx.pwaAssetsGenerator if (pwaAssetsGenerator) await pwaAssetsGenerator.generate() - await _generateSW(ctx) + if (!ctx.options.disable) + await _generateSW(ctx) } }, },