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

    Exclude url from __precacheManifest in quasar PWA

    Framework
    2
    7
    606
    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.
    • J
      jitendra16 last edited by

      This is my routes.js file content

       {
          path: 'qa',
          component: () =>
                          import('pages/QA.vue')
        },
        {
          path: 'social',
          component: () =>
                          import('pages/Social.vue')
        },
      
      

      Both URLs gets included in precachemanifest on PWA build, How can I exclude one URL from precachemanifest ? I want this behaviour because among 50 users only one user have permission to access a particular URL, so I want to load that resource on demand for that one user to reduce the PWA size and save bandwidth,

      1 Reply Last reply Reply Quote 0
      • J
        jitendra16 last edited by

        I have tried this, but no change in precache-manifest.js on build.

          {
            path: 'subjectmodule',
            component: () =>
                            import(/* webpackPrefetch: false */ /* webpackPreload: false */ 'pages/QA.vue')
          },
        
        1 Reply Last reply Reply Quote 0
        • J
          jitendra16 last edited by

          @s-molinari @rstoenescu Can you please give a hint about this.

          1 Reply Last reply Reply Quote 0
          • rstoenescu
            rstoenescu Admin last edited by rstoenescu

            To exclude an entry from Workbox’s precache manifest: quasar.conf.js > pwa > workboxOptions > exclude (more info on workbox webpack plugin’s docs).
            Note that q/app v1.8 will have prefetch/preload disabled by default. But do not mistake prefetch and preload with the PWA precache manifest! Two different things.

            1 Reply Last reply Reply Quote 1
            • rstoenescu
              rstoenescu Admin last edited by

              @jitendra16 quasar/app v1.8 released!

              J 1 Reply Last reply Reply Quote 1
              • J
                jitendra16 @rstoenescu last edited by jitendra16

                @rstoenescu i got error on build

                quasar build -m pwa
                
                
                 Build mode........ pwa
                 Pkg quasar........ v1.10.0
                 Pkg @quasar/app... v1.8.0
                 Debugging......... no
                 Publishing........ no
                
                 app:extension Running "@quasar/qcalendar" Quasar App Extension... +0ms
                 app:quasar-conf Reading quasar.conf.js +11ms
                 app:quasar-conf Extension(@quasar/qcalendar): Extending quasar.conf... +5ms
                 App Extension (qcalendar) Info: 'Adding qcalendar boot reference to your quasar.conf.js'
                 App Extension (qcalendar) Info: 'Adding calendar-daily.styl css reference to your quasar.conf.js'
                 App Extension (qcalendar) Info: 'Adding calendar-weekly.styl css reference to your quasar.conf.js'
                 app:workbox [InjectManifest] Using your custom service-worker written file +1s
                 app:webpack Extending PWA Webpack config +41ms
                 app:artifacts Cleaned build artifact: "/Applications/MAMP/htdocs/lumen/school_front/school_app/dist/pwa" +12ms
                 app:generator Generating Webpack entry point +0ms
                 app:build Building... +9ms
                
                 • Compiling:
                 └── PWA ████████████████████ 95% emitting manifest.json
                
                (node:5572) UnhandledPromiseRejectionWarning:   ValidationError: "runtimeCaching" is not a supported parameter.
                
                  - errors.js:202 Object.exports.process
                    [school_app]/[@hapi]/joi/lib/errors.js:202:19
                  
                  - index.js:763 internals.Object._validateWithOptions
                    [school_app]/[@hapi]/joi/lib/types/any/index.js:763:31
                  
                  - index.js:797 internals.Object.validate
                    [school_app]/[@hapi]/joi/lib/types/any/index.js:797:21
                  
                  - validate.js:11 module.exports
                    [school_app]/[workbox-build]/build/entry-points/options/validate.js:11:35
                  
                  - get-manifest.js:49 
                    [school_app]/[workbox-build]/build/entry-points/get-manifest.js:49:21
                  
                  - Generator.next
                  
                  - asyncToGenerator.js:3 asyncGeneratorStep
                    [school_app]/[@babel]/runtime/helpers/asyncToGenerator.js:3:24
                  
                  - asyncToGenerator.js:25 _next
                    [school_app]/[@babel]/runtime/helpers/asyncToGenerator.js:25:9
                  
                  - asyncToGenerator.js:32 
                    [school_app]/[@babel]/runtime/helpers/asyncToGenerator.js:32:7
                  
                  - new Promise
                  
                  - asyncToGenerator.js:21 
                    [school_app]/[@babel]/runtime/helpers/asyncToGenerator.js:21:12
                  
                  - get-manifest.js:66 _getManifest
                    [school_app]/[workbox-build]/build/entry-points/get-manifest.js:66:23
                  
                  - get-manifest.js:41 getManifest
                    [school_app]/[workbox-build]/build/entry-points/get-manifest.js:41:23
                  
                  - inject-manifest.js:107 
                    [school_app]/[workbox-webpack-plugin]/build/inject-manifest.js:107:28
                  
                  - Generator.next
                  
                  - asyncToGenerator.js:3 asyncGeneratorStep
                    [school_app]/[@babel]/runtime/helpers/asyncToGenerator.js:3:24
                  
                
                
                1 Reply Last reply Reply Quote 0
                • rstoenescu
                  rstoenescu Admin last edited by

                  @jitendra16 Fixed. Thanks for reporting! Please upgrade to latest “@quasar/app” v1.8.3.

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