Comments (3)
@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.
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.
from nuxt.
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)
- State gets lost with "soft" reset when using @vite-pwa/nuxt and nuxt-auth-utils HOT 5
- How to disable caching "_nuxt" folder due to "The server responded with a status of 429" after every update!!! HOT 4
- How to use it with useAsyncData? HOT 1
- Service worker keeps showing 'trying to install' when using `app.baseURL` under injectManifest strategy HOT 1
- Importing the virtual module in a unit test with Vitest HOT 2
- npm WARN when run "npm i @vite-pwa/nuxt -D" HOT 3
- [Feature Request]: dynamic manifest.json via nitro HOT 2
- pwa does not cache data in Nuxt 3 SSR HOT 3
- Firefox injectManifest not working HOT 1
- Cannot find module '#pwa' or its corresponding type declarations. HOT 2
- vite-pwa/nuxt not working on ios
- Module does nothing ? (EDIT: No Firefox support ?) HOT 9
- Nuxt3 + PWA warnings in terminal HOT 6
- cant use npm run build
- I can't get 'start_url' to work for me
- showInstallPrompt not being called HOT 1
- Uncaught ReferenceError: __NUXT_ASYNC_CONTEXT__ is not defined HOT 7
- Service Worker "import sentry-release-injection" error when loading page HOT 19
- @vite-pwa/nuxt and vue-tsc conflict HOT 4
- API Request URLs Open in New Tab Redirect to 404 Page HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt.