Skip to content
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

Breaks in Next.js 12 #17

Closed
collegewap opened this issue Oct 26, 2021 · 3 comments · Fixed by #18
Closed

Breaks in Next.js 12 #17

collegewap opened this issue Oct 26, 2021 · 3 comments · Fixed by #18

Comments

@collegewap
Copy link

I have read the readme mentioning about this might break in future version of Next.js.
Next.js 12 was released today and it breaks. Is there a way to fix this?

image

@souporserious
Copy link
Owner

Figured it would break in the next major 😅. It'll be a little bit before I can dig into this.

cc @pveyes @pacocoursey looks like /eventsource has been removed, any ideas here? Looks like it could just be renaming to import from /websocket?

@pveyes
Copy link
Contributor

pveyes commented Oct 27, 2021

Looking at the PR vercel/next.js#29903 seems like we need do few adjustments

  • Replace getEventSourceWrapper from /eventsource to connectHMR from /websocket (seems like the args is basically the same, so we can just replace the import
  • Refactor https://github.com/souporserious/next-remote-refresh/blob/main/server.js to use websocket instead of SSE. The heartbeat is no longer needed as it's removed, but the event action: 'building' is still the same

@souporserious
Copy link
Owner

Thanks for looking into this, @pveyes! I'll try to get to this soon and get a PR going.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants