rsnext/test/e2e/streaming-ssr
Jiachi Liu 60dd6dfc9b
Fix module error for findDOMNode on edge (#43998)
## Bug

The `findDOMNode` will be exported from ReactDOM in esm mode, but it's
not defined for SSR since SSR is using react-dom server stub bundle
which doesn't contain any thing. So `import { findDOMNode } from
'react-dom'` will error in that case with bundling.

Since it's only being used on client, we import ReactDOM and call
`ReactDOM.findDOMNode` to avoid bundling error and adding a condition to
tree-shake it off on client

[slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1670608621289259)

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
2022-12-13 09:16:01 -08:00
..
custom-server test: merge edge ssr tests (#39924) 2022-08-24 23:56:59 +01:00
streaming-ssr Fix module error for findDOMNode on edge (#43998) 2022-12-13 09:16:01 -08:00
index.test.ts Fix module error for findDOMNode on edge (#43998) 2022-12-13 09:16:01 -08:00