[vite] The offline path is requested regardless of the original path when online in dev mode
See original GitHub issueDescription of the bug
The service worker always requests the offline path in dev mode even if the original request path is different. Although this makes sense when the app is offline, it is absolutely incorrect when the app is online.
The related code fragment:
Expected behavior
When the app is online, the service worker should not modify HTTP requests.
When the app is offline, the service worker should redirect HTTP requests to the offline path.
Minimal reproducible example
- Clone https://github.com/vaadin/cookbook
- Run
mvn
- Open http://localhost:8080/css-from-java
Expected:
<meta name="description" content="This recipe shows how to inject small CSS class definitions into the current page from Java.">
Actual:
<meta name="description" content="Find ready to use solutions and code snippets for common development problems and UX patterns. Includes Vaadin examples in Java and TypeScript.">
Versions
- Vaadin / Flow version: 23
- Java version: 17
- OS version: Mac OS
Issue Analytics
- State:
- Created a year ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Troubleshooting - Vite
Switch to another package manager (e.g. pnpm , yarn ); Remove & from the path to your project. Dev Server #. Requests are...
Read more >Configuring and managing high availability clusters Red Hat ...
If the majority of nodes go offline or become unavailable, the cluster no longer has quorum and Pacemaker stops clustered services. The quorum...
Read more >Perspectives on retail and consumer goods - McKinsey
Charting a path forward. Redefining value and affordability in retail's next normal. The next normal: Retail M&A and partnerships after COVID-19.
Read more >Does Chrome have a "Work Offline" option? - Stack Overflow
It looks like Chrome now has this feature via Chrome developer tools (Ctrl-Shift-I). Click on the "Device Mode" icon at the top-left.
Read more >The ways of Workbox - Chrome Developers
Regardless of how you integrate with Workbox, the various tools offer a similar API. # generateSW vs injectManifest. You'll rely on one of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! That’s correct, I misunderstood it. It always adds the
<meta>
tag with the value for the root.You should see it when you have the server running, http://localhost:8080/css-from-java open and press refresh in the browser