Unverified Commit f509de95 authored by Janka Uryga's avatar Janka Uryga Committed by GitHub

Fix react-dom aliases for edge RSC (#63619)

Follow up to #63588, we missed edge there

Closes NEXT-2905
parent 81c6b569
......@@ -727,11 +727,13 @@ async fn rsc_aliases(
if runtime == NextRuntime::Edge {
if matches!(ty, ServerContextType::AppRSC { .. }) {
alias["react"] = format!("next/dist/compiled/react{react_channel}/react.react-server");
alias["react-dom"] =
format!("next/dist/compiled/react-dom{react_channel}/react-dom.react-server");
} else {
// x-ref: https://github.com/facebook/react/pull/25436
alias["react-dom"] =
format!("next/dist/compiled/react-dom{react_channel}/server-rendering-stub");
}
// Use server rendering stub for RSC and SSR
// x-ref: https://github.com/facebook/react/pull/25436
alias["react-dom"] =
format!("next/dist/compiled/react-dom{react_channel}/server-rendering-stub");
}
insert_exact_alias_map(import_map, project_path, alias);
......
......@@ -299,12 +299,12 @@ export function createRSCAliases(
alias[
'react-dom$'
] = `next/dist/compiled/react-dom${bundledReactChannel}/react-dom.react-server`
} else {
// x-ref: https://github.com/facebook/react/pull/25436
alias[
'react-dom$'
] = `next/dist/compiled/react-dom${bundledReactChannel}/server-rendering-stub`
}
// Use server rendering stub for RSC and SSR
// x-ref: https://github.com/facebook/react/pull/25436
alias[
'react-dom$'
] = `next/dist/compiled/react-dom${bundledReactChannel}/server-rendering-stub`
}
if (reactProductionProfiling) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment