Static GitHub Issues

[583] Offline Plugin not working with nuxt generate

prev: IE 11 - [nuxt.js] Cannot load components SyntaxError: Expected ':'
next: Maximum call stack size exceeded

Love Nuxt and am excited about Offline Plugin support!

I'm trying to use it in a project where I use nuxt generate feature. I'm basing it off of the offline plugin demo.

The problem I'm running into is that I can't get the service worker to be created in the root directory. It instead gets placed in the _nuxt directory. Since the service worker isn't at root, it doesn't correctly work offline as not all of the assets are handled. Only what's in dist/_nuxt is handled by the service worker so the offline plugin doesn't really work offline.

I've tried to set various options for the offline plugin, but with no success.

Has anyone gotten an offline plugin example working with nuxt generate?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c503">#c503</a>)</em></sub></div>