No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Custom SW script

    Help
    1
    2
    462
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      magdkudama last edited by

      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.build.distDir}/**/*.{${cfg.pwa.cacheExt}}`],
                minify: cfg.build.minify,
                stripPrefix: cfg.build.distDir.replace(/\\/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?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • M
        magdkudama last edited by

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

        Thank you!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post