Skip to content

Commit 65354d4

Browse files
committed
Adds a warning for minified development build
1 parent 3e2897f commit 65354d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/renderers/shared/fiber/ReactFiberDevToolsHook.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ if (
4242
return 42;
4343
}
4444
};
45+
warning(
46+
(testMinification.name || testMinification.toString())
47+
.indexOf('testMinification') !== -1,
48+
"It looks like you're using a minified copy of the development build " +
49+
'of React. When deploying React apps to production, make sure to use ' +
50+
'the production build which skips development warnings and is faster. ' +
51+
'See https://fb.me/react-minification for more details.',
52+
);
4553
rendererID = inject(Object.assign({}, internals, {testMinification}));
4654
};
4755

0 commit comments

Comments
 (0)