Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to disable the PWA/worker on certain routes? #65

Open
ymansurozer opened this issue Sep 22, 2023 · 3 comments
Open

Is it possible to disable the PWA/worker on certain routes? #65

ymansurozer opened this issue Sep 22, 2023 · 3 comments

Comments

@ymansurozer
Copy link

I want to disable the PWA for certain routes where I do not need PWA functionality. Is that possible with this module?

@userquin
Copy link
Member

@ymansurozer
Copy link
Author

Thank you very much @userquin. I've tried that as the following unde pwa in my nuxt.config.ts but it did not work.

workbox: {
      navigateFallback: "/",
      navigateFallbackDenylist: [/^\/chat\/embed/],
      globPatterns: ["**/*.{js,css,html,png,svg,ico}"],
    },

So I am trying to exclude /chat/embed/** routes from the PWA. But I still see the 'install app' button on those pages (also devtools show an sw is registered on the page).

Does navigateFallbackDenylist fully exclude a page from the scope of the PWA or am I doing something wrong?

@userquin userquin reopened this Sep 27, 2023
@userquin
Copy link
Member

You should also exclude the html pages and their assets using globIgnores, but this would be a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants