-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix: reload page when routeModules doesn't contain module for current route #6409
fix: reload page when routeModules doesn't contain module for current route #6409
Conversation
… route This can happen when entry.client.ts isn't fully loaded before a route change occurs. See remix-run#1757 for more info.
🦋 Changeset detectedLatest commit: 8c18d95 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@brophdawg11 This is the PR I referenced here #5166 (comment) |
Co-authored-by: Leo Singer <leo.p.singer@nasa.gov>
Thanks for the PR @n8agrin - I pulled it down and did some testing - nice work getting an E2E test for this! I made some minor alterations - let me know what you think:
|
I noticed I was tagged to review this, but I'm not a Remix maintainer. Was this a mistake? |
@lpsinger I think that's only because of your comment above from last month |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙏 this lgtm! Thanks for taking a pass @brophdawg11
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Hello @n8agrin, this PR is causing issue with CDNs. Our CDN is caching page html with query params on from tracking links (e.g.) Google. This is then been compared to the URL another user is visiting and viewing the cached versions of the page, when the mismatch occurs the page gets into an infinite reload loop. I can see this affecting many users who also use CDN's like this. |
This can happen when entry.client.ts isn't fully loaded before a route change occurs.
The fix is to validate the route's module is loaded, and if not, simply reload the page. Credit to @brophdawg11 who suggested this approach here: #1757 (comment)
See #1757 for more info.
Closes: #1757
Testing Strategy: