Giter VIP home page Giter VIP logo

Comments (7)

userquin avatar userquin commented on July 18, 2024

@lovkyndig review globPatterns, you are including everything, you only need the client and prerendered kit output folders:
https://github.com/vite-pwa/sveltekit/blob/main/examples/sveltekit-ts/vite.config.ts#L70

Upps, wrong link/issue...

from nuxt.

userquin avatar userquin commented on July 18, 2024

@lovkyndig try to update your workbox.globPatterns entry, since you are including everything in the sw precache manifest, workbox is duplicated (once for dev-dist folder and once for production sw)

https://github.com/vite-pwa/nuxt/blob/main/playground/nuxt.config.ts#L51

About this, it is not being used on build, devOptions will be only used when running dev server:

    devOptions: {
      enabled: true // CHANGE TO FALSE ON PRODUCTION
    },

from nuxt.

lovkyndig avatar lovkyndig commented on July 18, 2024

Wow this was very fast and incredibly good suggestions for solutions. I'll try it out. You are really very quick to help.

from nuxt.

lovkyndig avatar lovkyndig commented on July 18, 2024

I changed something and now I think I'm on the right track, but still no pages offline.

One of my problem with non-precached-url, for the root '/':
image

This problem was solved with the following configuration in nuxt.config:

nitro: {
    prerender: {
        routes: [ '/']
    }
},

from nuxt.

userquin avatar userquin commented on July 18, 2024

@lovkyndig have you added VitePWAManifest to your app.vue or layouts? https://vite-pwa-org.netlify.app/frameworks/nuxt.html

It is removed in your repo, in app.vue...

from nuxt.

lovkyndig avatar lovkyndig commented on July 18, 2024

Thank you very much for good advice! I will try to add the VitePWAManifest in app.vue
...
No differens with inserting VitePWAManifest in app.vue - still no html-files in cache - only _nuxt-folder-content.
offline

The service-worker is REDUNDANT:

redundant webworker

My repo and depoloyment.

from nuxt.

lovkyndig avatar lovkyndig commented on July 18, 2024

The problem is solved in issue 32.

Thanks for helping me!

from nuxt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.