vue-cli-plugin-prerender-spa icon indicating copy to clipboard operation
vue-cli-plugin-prerender-spa copied to clipboard

index.html precache-manifest version not changing (vue cli pwa)

Open jaunt opened this issue 5 years ago • 1 comments

I'm using the plugin with "/" as one of my pre rendered routes. This of course generates an app.html since index.html becomes the pre-rendered version.

I'm also using the Vue CLI 3 PWA plugin in InjectManifest mode. What happens, is that the build process creates the precache-manifest.xxxxx.js file, and has both the app.html and index.html file, but index.html revision never changes, so my service worker gets confused once deployed as the new index.html file isn't loaded on an update. App.html seems to get a new version which is good.

I wonder if it has to do with order of operations. I.e. when does vue-cli-plugin-prerender-spa create app.html, and then I guess overwrite the index.html file generated by webpack build? I'm guessing that the workbox plugin which hashes the files to create the revision strings in precache-manifest.xxxxx.js is doing it an an inopportune time.

Thoughts?

Thanks!

jaunt avatar Sep 04 '19 20:09 jaunt

My solution is here, but I've since abandoned pre-rendering altogether. I believe my app isn't well suited to it. https://gist.github.com/jaunt/b5127af103995e80dd74ff14662a0281

jaunt avatar Sep 10 '19 19:09 jaunt