Skip to content

Commit

Permalink
Merge pull request #5083 from spicyj/warn-min
Browse files Browse the repository at this point in the history
Warn when using a minified copy of dev React
  • Loading branch information
sophiebits committed Oct 8, 2015
2 parents c511f16 + f3a506b commit 3f57470
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/renderers/dom/ReactDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ if (__DEV__) {
}
}

var testFunc = function testFn() {};
warning(
(testFunc.name || testFunc.toString()).indexOf('testFn') !== -1,
'It looks like you\'re using a minified copy of the development build ' +
'of React. When deploying React apps to production, make sure to use ' +
'the production build which skips development warnings and is faster. ' +
'See https://fb.me/react-minification for more details.'
);

// If we're in IE8, check to see if we are in compatibility mode and provide
// information on preventing compatibility mode
var ieCompatibilityMode =
Expand Down Expand Up @@ -102,7 +111,8 @@ if (__DEV__) {

for (var i = 0; i < expectedFeatures.length; i++) {
if (!expectedFeatures[i]) {
console.error(
warning(
false,
'One or more ES5 shims expected by React are not available: ' +
'https://fb.me/react-warning-polyfills'
);
Expand Down

0 comments on commit 3f57470

Please sign in to comment.