Skip to content

Commit 02a334d

Browse files
ignore checking client entry point for umd build
1 parent 985272e commit 02a334d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-dom/src/client/ReactDOM.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function createRoot(
149149
options?: CreateRootOptions,
150150
): RootType {
151151
if (__DEV__) {
152-
if (!Internals.usingClientEntryPoint) {
152+
if (!Internals.usingClientEntryPoint && !__UMD__) {
153153
console.error(
154154
'You are importing createRoot from "react-dom" which is not supported. ' +
155155
'You should instead import it from "react-dom/client".',
@@ -165,7 +165,7 @@ function hydrateRoot(
165165
options?: HydrateRootOptions,
166166
): RootType {
167167
if (__DEV__) {
168-
if (!Internals.usingClientEntryPoint) {
168+
if (!Internals.usingClientEntryPoint && !__UMD__) {
169169
console.error(
170170
'You are importing hydrateRoot from "react-dom" which is not supported. ' +
171171
'You should instead import it from "react-dom/client".',

0 commit comments

Comments
 (0)