Skip to content

Commit

Permalink
ignore checking client entry point for umd build
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza-molaee committed Apr 4, 2022
1 parent 985272e commit 02a334d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/client/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function createRoot(
options?: CreateRootOptions,
): RootType {
if (__DEV__) {
if (!Internals.usingClientEntryPoint) {
if (!Internals.usingClientEntryPoint && !__UMD__) {
console.error(
'You are importing createRoot from "react-dom" which is not supported. ' +
'You should instead import it from "react-dom/client".',
Expand All @@ -165,7 +165,7 @@ function hydrateRoot(
options?: HydrateRootOptions,
): RootType {
if (__DEV__) {
if (!Internals.usingClientEntryPoint) {
if (!Internals.usingClientEntryPoint && !__UMD__) {
console.error(
'You are importing hydrateRoot from "react-dom" which is not supported. ' +
'You should instead import it from "react-dom/client".',
Expand Down

0 comments on commit 02a334d

Please sign in to comment.