mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-23 09:55:28 +03:00
chore: update pwa module configuration
This commit is contained in:
parent
c189f951ff
commit
8552bc96f9
1 changed files with 3 additions and 2 deletions
|
@ -112,11 +112,11 @@ export default defineNuxtModule<VitePWANuxtOptions>({
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
nuxt.hook('vite:serverCreated', (viteServer, { isServer }) => {
|
nuxt.hook('vite:serverCreated', (viteServer, { isServer }) => {
|
||||||
if (isServer || !tauriPlatform)
|
if (isServer)
|
||||||
return
|
return
|
||||||
|
|
||||||
viteServer.middlewares.stack.push({ route: webManifest, handle: emptyHandle })
|
viteServer.middlewares.stack.push({ route: webManifest, handle: emptyHandle })
|
||||||
if (webmanifests) {
|
if (webmanifests && !tauriPlatform) {
|
||||||
Object.keys(webmanifests).forEach((wm) => {
|
Object.keys(webmanifests).forEach((wm) => {
|
||||||
viteServer.middlewares.stack.push({
|
viteServer.middlewares.stack.push({
|
||||||
route: `${nuxt.options.app.baseURL}manifest-${wm}.webmanifest`,
|
route: `${nuxt.options.app.baseURL}manifest-${wm}.webmanifest`,
|
||||||
|
@ -141,6 +141,7 @@ export default defineNuxtModule<VitePWANuxtOptions>({
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nuxt.hook('nitro:config', async (nitroConfig) => {
|
nuxt.hook('nitro:config', async (nitroConfig) => {
|
||||||
|
// /manifest.webmanifest added on nuxt config file
|
||||||
if (!tauriPlatform)
|
if (!tauriPlatform)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue