New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$pwa is always false #70
Comments
Most of my PWA-related changes/fixes/debugging were in: Doyban/Doyban-Website@6c13721 whereas the entire repo can be found on https://github.com/Doyban/Doyban-Website |
why are you using EDIT: are you using generate or build to deploy the app? if using build, you should prerender the root route (/) |
No changes without
I'm using |
Move the sw.js to some src folder and update the pwa options, you need to "build" it since cannot use you're using import statements inside a service worker (sw cannot use static/dynamic imports if you don't register it using type module, and will work only on chromium based browsers; IIRC you cannot use dynamic imports with type module yet). You can also change static imports with Check elk.zone github repo, you've an example and the configuration needed to build your service worker, check servce-worker folder and typescrupt option in nuxt.config.ts file (the service worker using TypeScript): |
I followed https://vite-pwa-org.netlify.app/frameworks/nuxt.html along with issues in the repo, created assets using https://vite-pwa-org.netlify.app/assets-generator/ and read https://vite-pwa-org.netlify.app/guide/pwa-minimal-requirements.html. Also, check the example at https://vite-pwa-org.netlify.app/examples/nuxt.html -> https://github.com/vite-pwa/nuxt/tree/main/playground.
In my
view-source:http://localhost:3000/
I can't see<link rel="manifest" href="/manifest.webmanifest">
or any other file related to PWA, such asfavicon
.Additionally, I've deployed the app to https://ibstructure.com and the PWA works, but the
$pwa
is still false. It's really confusing when trying to validate during development (esp. onlocalhost
with bad documentation/localhost
-PWA
problems) whether the app is PWA working.The text was updated successfully, but these errors were encountered: