fix(next/image): don't call ReactDOM.preload if missing, such as jest (#53443)
### What? `ReactDOM.preload` is available in `react-dom@experimental` builds. If it's not available, we should fall back to `Head`+`link` ### Why? Since `ReactDOM.preload` is only available in `react-dom@experimental` builds, certain environments (like Jest or [Storybook](https://github.com/storybookjs/storybook/issues/23661)) might have a version of `react-dom` installed that won't work with `preload()` ### How? Closes NEXT-1482 Fixes #53272 See also: https://github.com/storybookjs/storybook/issues/23661Co-authored-by:Steven <229881+styfle@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment