react/packages/react-dom/npm/profiling.react-server.js
Josh Story 556a087de3
[DOM] disallow client entrypoints with react-server condition (#28784)
`react-server` precludes loading code that expects to be run in a client
context. This includes react-dom/client react-dom/server
react-dom/unstable_testing react-dom/profiling and react-dom/static

This update makes importing any of these client only entrypoints an
error
2024-04-08 15:37:06 -07:00

6 lines
104 B
JavaScript

'use strict';
throw new Error(
'react-dom/profiling is not supported in React Server Components.'
);