-
Notifications
You must be signed in to change notification settings - Fork 89
fix: improves support for __NEXT_PRIVATE_PREBUNDLED_REACT #2236
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
Conversation
✅ Deploy Preview for netlify-plugin-nextjs-export-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for nextjs-plugin-custom-routes-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for next-plugin-edge-middleware ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for next-plugin-canary ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for next-i18next-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -23,6 +23,10 @@ const getNetlifyNextServer = (NextServer: NextServerType) => { | |||
private netlifyConfig: NetlifyConfig | |||
private netlifyPrerenderManifest: PrerenderManifest | |||
|
|||
public getAppRouterReactVersion(): string { |
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.
Added this public method so we can get the React version to set process.env.__NEXT_PRIVATE_PREBUNDLED_REACT
if the request fails with [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './ server.edge' is not defined
Gonna revisit this on Monday. I think I need to rerun the override hooks for this fix. |
✅ Deploy Preview for netlify-plugin-nextjs-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
❌ Deploy Preview for lukas-next-runtime-demos-default failed.
|
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.
Nice sleuthing, @taty2010 and thanks for all your work prior @nickytonline! Looks great to me.
Description
Improves support for setting
__NEXT_PRIVATE_PREBUNDLED_REACT
. We have an implementation that detects when to set__NEXT_PRIVATE_PREBUNDLED_REACT
toexperimental
but there are edge cases. The fix is a naive approach where__NEXT_PRIVATE_PREBUNDLED_REACT
is set toexperimental
if the request fails, and we reattempt the request.Documentation
Relates to https://github.com/netlify/pod-ecosystem-frameworks/issues/489
Tests
You can test this change yourself like so:
Relevant links (GitHub issues, etc.) or a picture of cute animal