fix(react): add resolve.dedupe for react/react-dom to prevent CJS multi-instance
React 19.2.5 is pure CJS. Rollup's CJS→ESM interop can create separate scoped ReactSharedInternals objects for react and react-dom, causing hooks to see a null dispatcher on the server build. resolve.dedupe forces a single shared instance.
This commit is contained in:
parent
e185885557
commit
066bb4e83d
@ -24,6 +24,7 @@ export default defineConfig({
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
dedupe: ["react", "react-dom"],
|
||||
},
|
||||
server: {
|
||||
host: true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user