-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[v2] [cache-dir] Use 404 resources in EnsureResources if the page doesn't exist #8510
Conversation
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.
Looks great!
window.location.replace(url) | ||
|
||
const url = getRedirectUrl(this.state.location.pathname) | ||
if (url) window.location.replace(url) |
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.
Could you use the non-shorthand form?
@@ -16,6 +17,7 @@ class EnsureResources extends React.Component { | |||
this.state = { | |||
location: { ...location }, |
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.
Where did we ever end up on this? Is this needed?
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.
hah, probably not! just don't use git blame
- it tells lies!
I chatted with @davidbailey00 a little and we (or just him) will iterate on this tomorrow |
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.
🙏
* 'master' of github.com:gatsbyjs/gatsby: feat(cache-dir): Add a button for custom 404s in development (gatsbyjs#8548) fix: add ecosystem team for starters YAML fix: fix displaying and hydrating 404 page in production builds (gatsbyjs#8510) fix: don't expect `application/json` type nodes to be files (gatsbyjs#8544) Delete cds-takeaways.md (gatsbyjs#8552) chore(release): Publish chore: remove npm-run-all dep and update deps in e2e tests (gatsbyjs#8529) [www] Site/Starter Showcase refactor, rinse II (gatsbyjs#8411) Rfc process doc (gatsbyjs#8537) [www] a11y improvements (gatsbyjs#8536) Update the GraphQL stitching blog post & docs (gatsbyjs#8516) fix: change teams to reduce noise for people
ensure-resources.js
load-directly-or-404.js
to prevent code reusegetResourcesFromPathnameSync
if the page isn't found, to match behaviour of the async versionFixes #8297