Skip to content Skip to sidebar Skip to footer

Creating A Service Worker In Vue.js Using Workbox's Injectmanifest Crashes

I am trying to use vue.js's progressive web app capabilities by creating a custom service worker through workbox. Everytime I attempt to build the app I get the following error: As

Solution 1:

I answered my own question. I needed to change project/vue.config.js to

module.exports = {
  runtimeCompiler: true,
  pwa: {
    workboxPluginMode: "InjectManifest",
    workboxOptions:{
      swSrc: "src/service-worker.js"
  }
};

Post a Comment for "Creating A Service Worker In Vue.js Using Workbox's Injectmanifest Crashes"