Skip to content

Commit

Permalink
fix: pwa icons not generated when disabled (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Mar 22, 2024
1 parent ce64470 commit d1a1047
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugins/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
},
},
Expand Down

0 comments on commit d1a1047

Please sign in to comment.