Closed rizkiheryandi closed 6 years ago
Hi. Are you running nuxt in dev mode? This template basically should works, only dependencies in package.json may be upgraded :)
Try generating a static site, upload to an HTTPS enabled hosting (or use surge after npm i -g surge) and try from there.
Alternatively, build it and run now (npm i -g now first) to upload it there as nodejs app and it should also work
@pi0 does this work no matter what we add to it in the nuxt template? (ie. new plugins and so on)
Also, how do we cache ajax requests?
@bovas85
workbox: {
handleFetch: true
}
in nuxt.config.js
works fine for caching ajax requests. Keep in mind that the @nuxtjs/pwa
dependency needs to be version 2 or higher for it to work.
And can confirm that it works just fine with a big range of modules and plugins. If you need to tweak the caching of the PWA module, have a look at the documentation for that (https://github.com/nuxt-community/pwa-module) and workbox (https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#abstract-types).
Hope this helps :)
Thanks @colsen1991
Even, no service worker register when i run the template