Giter VIP home page Giter VIP logo

Comments (3)

userquin avatar userquin commented on June 19, 2024

@Timtendo12 The plugin in dev will intercept only the entry point as you can see in your last screenshot, about the errors from background.js module you should check what's happening.

In elk.zone gh repo we use a middleware and the index page is using it, the page is empty, the middleware always navigate to another page: https://github.com/elk-zone/elk/blob/main/middleware/auth.ts

from nuxt.

Onyoursix avatar Onyoursix commented on June 19, 2024

I upgraded from 0.0.7 to 0.1.0 and I have this exact same issue in dev mode. Reloading (or going direct) localhost:3000/LiterallyAnyPageHere to see changes being worked on will redirect me to /. Even more strange is if there's a query in the url localhost:3000/LiterallyAnyPageHere?c=something it will redirect me localhost:3000?c=something.

This has me scratching my head, because even when I downgrade back to 0.0.7, unregister the server worker, delete cache etc. The problem STILL persists. I'm at a loss on this issue. Disabling the plugin does "fix" the issue.

No idea if this screen shot helps, mainly did it because OP did. There are no errors in my console or messages, just redirects as if it's hard programmed into every page.

image

from nuxt.

Onyoursix avatar Onyoursix commented on June 19, 2024

Just an update, I found a fix for this.

When I manually added strategies: 'generateSW', to my nuxt.confit.ts pwa settings that seemed to fix it. I know that's supposed to be the default mode, but manually adding it seems to fix my issue. Here are my pwa config settings

    pwa: {
        strategies: 'generateSW',
        registerType: 'autoUpdate',
        manifest: {
            name: "myApp",
            short_name: "myApp",
            description: "myApp",
            theme_color: "#00d6e6",
            icons: [
                {
                    src: "img/icons/apple-touch-icon-76x76.png",
                    sizes: "64x64",
                    type: 'image/png'
                },
                {
                    src: "img/icons/apple-touch-icon-152x152.png",
                    sizes: "144x144",
                    type: 'image/png'
                },
                {
                    src: "img/icons/apple-touch-icon-180x180.png",
                    sizes: "180x180",
                    type: 'image/png'
                },
                {
                    src: "img/icons/android-chrome-192x192.png",
                    sizes: "192x192",
                    type: 'image/png'
                },
                {
                    src: "img/icons/android-chrome-512x512.png",
                    sizes: "512x512",
                    type: 'image/png'
                }
            ]
        },
        workbox: {
            navigateFallback: '/',
            globPatterns: ['**/*.{js,css,html,png,svg,ico}'],            
        },
        devOptions: {
            enabled: true,           
            navigateFallbackAllowlist: [/^\/$/],
            type: 'module',
        }
    },

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.