[Vuejs]-Vue CLI 4 – PWA plugin pre-cache in manifest fails to fetch index.html and doesn't register the service worker

0πŸ‘

βœ…

It turned out the problem was in the configuration of firebase.json, in the section of hosting, I hade enabled "cleanUrls": true. Removing it made the service worker register again.

this is how it looks now, the default settings:

 "hosting": {
    "public": "dist",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "**",
        "destination": "/index.html"
      }
    ]
  },

Leave a comment