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 setup a Vue 3 project with command npm create vue@latest. Then to add PWA I installed vite-plugin-pwa, updated vite.config.js and made some changes to other files, see below.
Now I get error about manifest.json, which is an empty file:
How can I fix that? I tried setting build in config.json to false, but that doesn't make a difference.
build: {
manifest: false,
}
The icons in the icons array in vite.config.js are correctly cached as far as I can see.
Two more issues:
Menu item to install the app on the mobile device doesn't work now (now only possible to add to startscreen (browser icon instead of app icon). How can I fix that?
Under 'Service workers' I can see that serviceworker sw.js is started, but the message in sw.js is not displayed in the console. Is there something I must do to make that message in sw.js appear?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I setup a Vue 3 project with command
npm create vue@latest
. Then to add PWA I installed vite-plugin-pwa, updated vite.config.js and made some changes to other files, see below.Now I get error about manifest.json, which is an empty file:

How can I fix that? I tried setting build in config.json to false, but that doesn't make a difference.
The icons in the icons array in vite.config.js are correctly cached as far as I can see.
Two more issues:
vite.config.js:
main.js look like this:
No registerServiceWorker.js file since as I understand it Vite should take care of that.
Package.json:
service-worker.js , for now:
Beta Was this translation helpful? Give feedback.
All reactions