Skip to content

Commit b1b63f1

Browse files
committed
chore: add changeset
1 parent 9a44958 commit b1b63f1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.changeset/spicy-seas-check.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@builder.io/qwik-city': patch
3+
---
4+
5+
fix: SPA routing is broken unless origin matches value in in vite.config #8093
6+
7+
If the SSG origin was set to `localhost:3000` and a user visited from `127.0.0.1:3000`, SPA routing would be broken.
8+
9+
Internally, useNavigate's context provider `goto` checks the new destination with the last route location. If the
10+
origin is different, it just does a normal browser navigation. This makes sense; links to other origins cannot use
11+
SPA routing. However, the initial route it compares was using an origin that came from the server environment.
12+
13+
Now, the first navigation will set that initial route to the browser's actual href, eliminating the erroneous
14+
origin mismatch for SPA navigations.

0 commit comments

Comments
 (0)