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

Skip edge compiler in next 12 #59

Merged
merged 1 commit into from Jun 7, 2022
Merged

Conversation

huozhi
Copy link
Contributor

@huozhi huozhi commented May 7, 2022

Latest version (12.0.6) of next.js introduces a new webpack compiler under 'edge' runtime. The preact debug chunk only works for entries from server and client compiler, so that we skip the prepending in 'edge' runtime compiler

Related to #60

kodiakhq bot pushed a commit to vercel/next.js that referenced this pull request May 7, 2022
x-ref: #36552 (comment)
x-ref: preactjs/next-plugin-preact#59

`preact/compat` doesn't have `/server.browser` exports, to make it work with latest of next.js: 

* use `react-dom/server` to detect if it could opt-in streaming rendering by checking react 18 `renderToPipeableStream` API in short time fix. In long term `preact/compat`should support `/server.browser` that same with react 17.
* Also filed a PR to `next-plugin-preact` to skip chunk-prepending to pages in edge compiler
@JoviDeCroock JoviDeCroock merged commit 4a8f1dd into preactjs:master Jun 7, 2022
@huozhi huozhi deleted the next-runtime branch June 7, 2022 09:21
@huozhi
Copy link
Contributor Author

huozhi commented Jun 7, 2022

Thank you! Could you let me know when there's a new release for the plugin? would love to do some test with the example around it

@JoviDeCroock
Copy link
Member

This has been released in 3.0.7 @huozhi

@huozhi
Copy link
Contributor Author

huozhi commented Jun 7, 2022

Works perfectly with current next stable and latest next canary 🚀 Thanks again for the reporting and the help on release! :shipit: @JoviDeCroock

@JoviDeCroock
Copy link
Member

Thank you for including us and your PR, highly appreciate this

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 this pull request may close these issues.

None yet

2 participants