Closed mkelk closed 6 days ago
Would you mind sharing a reproduction of what's not working? This is too vague to help you.
Thanks for a quick response!
Certainly, I'll collect some material tomorrow.
Roughly, it seems that vite-pwa/nuxt when building collects info in two different dirs; one for the stuff in /app and another for the PWA generated things (like the manifest). And it seems that it does not register the manifest in index.html. So like UI Pro and the PWA plugin can't really agree on where the app really is and get it collected. I have adjusted many times in nuxt.config.js without making it match up. I can make a PWA using the same methods in regular Nuxt, that is why I'm suspecting the /app aspect to be the confusing factor.
As I said, I'll collect some more specific details.
In the meantime - do you know of a single example of UI Pro and PWA working? A working example would do wonders for my debugging of what's wrong.
I'll be back with more info.
Morten
Maybe I'll make a small demo in github to show the problem. That would probably be the most concrete way to illustrate it!
Hi Benjamin,
Here is more detail.
Take a look at https://github.com/mkelk/tst-ui-pro-pwa, the main branch It is a fresh install of UI Pro Dashboard.
I have followed the guidelines for installing PWA. It partially works with a service-worker running, but the manifest is not registered and so the browser does not recognize the app as a PWA.
You can follow each installation step as individual commits.
I have documented both installation and problem at the top of the README: https://github.com/mkelk/tst-ui-pro-pwa
I hope you can make sense of it.
Regards, Morten
Got it working (latest commit in https://github.com/mkelk/tst-ui-pro-pwa).
I was missing <VitePwaManifest />
in the actual pages.
Do you have any working example of using UI Pro with PWA? I seem to be struggling endlessly with confusion between the root dir (used in regulser Nuxt) and the app dir used by UI Pro. Or maybe some pointers to how to structure the interplay of nuxt.config.js and package.json and (if using Netlify) netlify.toml.
It is quite critical for my business case and I would hate to abandon UI Pro.
Help would very much appreciated!!
Morten