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
Client-side HMR message types #55009
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
export default function initializeBuildWatcher( | ||
toggleCallback: (cb: (obj: Record<string, any>) => void) => void, | ||
toggleCallback: (handlers: ShowHideHandler) => void, |
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.
Changed this as previously it relied on building
and built
faked HMR events which wasn't needed, just a way to show/hide the building indicator.
if (pages.includes(router.query.__NEXT_PAGE)) { | ||
return window.location.reload() | ||
addMessageListener((payload) => { | ||
if ('action' in payload) { |
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 is the same code as before, the diff is a bit messed up but had to split it by 'action' in payload
in order to do type narrowing.
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
Passed | Secrets | 0 0 0 0 | View in Orca |
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.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
Passed | Secrets | 0 1 0 0 | View in Orca |
Continuation of the previous PRs that introduce HMR event types for the server-side code, this leverages those types client-side too.