You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it would be a nice feature to have the possibility to keep at least some keys of the manifest file dynamic to get them from an api for example. One use case would be to change the app icon without having to create a new build.
As a proof of concept I wrote a module with a server handler that can return a manifest. (and replaced hrefs from manifest.webmanifest to my manifest route
exportdefaultdefineEventHandler((event)=>{setResponseHeaders(event,{"Content-Type": "application/manifest+json"})consttest=Math.random()*12// maybe fetch some api (configured via config) to merge default config and dynamic keys via defureturn{/* this might be replaced by e.g. $fetch(/api/manifest-overrides) + merge with default*/"name": `Vitesse for Nuxt ${test}`,"short_name": `Vitesse for Nuxt ${test}`,"start_url": "/","display": "standalone","background_color": "#ffffff","lang": "en","scope": "/","id": "/","description": `Vitesse for Nuxt ${test}`,"theme_color": "#ffffff","icons": [{"src": "/pwa-192x192.png","sizes": "192x192","type": "image/png"},{"src": "/pwa-512x512.png","sizes": "512x512","type": "image/png"},{"src": "/maskable-icon.png","sizes": "512x512","type": "image/png","purpose": "any maskable"}]}})
Note
Changing the title is only for poc. It is more of a usecase to change colors, locale or images
I think it would be a nice feature to have the possibility to keep at least some keys of the manifest file dynamic to get them from an api for example. One use case would be to change the app icon without having to create a new build.
As a proof of concept I wrote a module with a server handler that can return a manifest. (and replaced hrefs from
manifest.webmanifest
to mymanifest
routeNote
Changing the title is only for poc. It is more of a usecase to change colors, locale or images
result:
next try:
might solve: #104
The text was updated successfully, but these errors were encountered: