Custom SW script

  • Hello,

    I want to be able to customize the SW script generated. The WebPack plugin allows for it, but Quasar (v0.15) seems to not be sending that information to the plugin.

    Quasar code:

    new SWPrecacheWebpackPlugin({
              cacheId: cfg.pwa.cacheId,
              filename: cfg.pwa.filename,
              staticFileGlobs: [`${}/**/*.{${cfg.pwa.cacheExt}}`],
              stripPrefix:\\/g, '/') + '/'

    Could we also add the importScripts option, so we can import our own SW code?

    What I want to achieve is caching fetch requests and serve them from cache, falling back to a network request (or opposite, it depends).

    Is there a way to customize the SW script?


  • Maybe there’s another way I’m not aware of?

    Thank you!

Log in to reply