Open joelvh opened 1 year ago
This should be resolved via #9695 and available in the next release 👍
🤖 Hello there,
We just published version 2.11.0-pre.0
which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!
Thanks!
🤖 Hello there,
We just published version 2.11.0
which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!
Thanks!
We had to revert the fix in #9695 so re-opening this. We should be able to remove this check entirely instead in #9890
What version of Remix are you using?
2.0.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
app/routes/folder.file._index.tsx
(URL path/folder/file
)https://www.example.com/folder/file
)remix.config.js
to setpublicPath = "/folder/file/build/
so assets link through the reverse proxyhttps://example.myshopify.com/folder/file
) which reverse proxies towww.example.com
https://www.example.com/folder/file/
)Initial URL (/folder/file/) does not match URL at time of hydration (/folder/file), reloading page...
Expected Behavior
Expect the refresh behavior to realize that a trailing slash should be ignored.
Temporary fix is to place the following in
entry.client.tsx
:Actual Behavior
Refresh doesn't realize the two paths are effectively the same.
UPDATE: It turns out this is also an issue with links and causes the inverse issue. The
Link
will have a path such as/folder/file
and the path in the browser becomes/folder/file/
, which I believe is updated by the router. I've updated the script that fixes this (above). I've also updated the steps to reproduce to call out that we are using a custompublicPath
.