Skip to content

Commit d1a1047

Browse files
authored
fix: pwa icons not generated when disabled (#691)
1 parent ce64470 commit d1a1047

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plugins/build.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ export function BuildPlugin(ctx: PWAPluginContext) {
4141
sequential: true,
4242
order: ctx.userOptions?.integration?.closeBundleOrder,
4343
async handler() {
44-
if (!ctx.viteConfig.build.ssr && !ctx.options.disable) {
44+
if (!ctx.viteConfig.build.ssr) {
4545
const pwaAssetsGenerator = await ctx.pwaAssetsGenerator
4646
if (pwaAssetsGenerator)
4747
await pwaAssetsGenerator.generate()
4848

49-
await _generateSW(ctx)
49+
if (!ctx.options.disable)
50+
await _generateSW(ctx)
5051
}
5152
},
5253
},

0 commit comments

Comments
 (0)