chore(pwa): change sw generation logic (#2494)
This commit is contained in:
parent
21376e013a
commit
5503ecbea2
3 changed files with 37 additions and 29 deletions
|
@ -217,10 +217,8 @@ export default defineNuxtModule<VitePWANuxtOptions>({
|
|||
}
|
||||
}
|
||||
})
|
||||
nuxt.hook('nitro:init', (nitro) => {
|
||||
nitro.hooks.hook('rollup:before', async () => {
|
||||
await resolveVitePluginPWAAPI()?.generateSW()
|
||||
})
|
||||
nuxt.hook('nitro:build:public-assets', async () => {
|
||||
await resolveVitePluginPWAAPI()?.generateSW()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue