-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
VitePWA only caches "/" and (as a possible result) only renders index (/) when running middleware code. #56
Comments
@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 |
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. |
Just an update, I found a fix for this. When I manually added
|
Since i've updated my nuxt version VitePWA/Nuxt acts very weird.
It only caches "/" instead of every (possible) route, spams alot of errors in console
Errors in console
As a result it also renders the index "/" whenever nuxt runs middleware code. resulting in flashes when navigating. Sometimes it even wont allow me to navigate to other pages. I see the url changing but before it even renders the page it returns to the index
Completly disbaling the plugin fixes these issues. I hope you'll take a look into it!
The text was updated successfully, but these errors were encountered: