Skip to content

Commit 16d71b4

Browse files
authored
fix: prefer nitro.static over _generate (#199)
1 parent d582865 commit 16d71b4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function configurePWAOptions(
6363

6464
// handle payload extraction
6565
if (nuxt.options.experimental.payloadExtraction) {
66-
const enableGlobPatterns = nuxt.options._generate
66+
const enableGlobPatterns = nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */
6767
|| (
6868
!!nitroConfig.prerender?.routes?.length
6969
|| Object.values(nitroConfig.routeRules ?? {}).some(r => r.prerender)

src/utils/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ export const periodicSyncForUpdates = ${typeof client.periodicSyncForUpdates ===
325325
)
326326
})
327327
})
328-
if (nuxt.options._generate) {
328+
if (nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */) {
329329
nuxt.hook('close', async () => {
330330
await regeneratePWA(
331331
options.outDir!,

0 commit comments

Comments
 (0)