Commit 9ce144ed authored by Joe Haddad's avatar Joe Haddad Committed by GitHub
Browse files

Add warning when using `react-error-overlay` in production (#3264)

* Add a warning when running minified

* Add more robust check

* Update index.js
parent 86b4b6ab
Showing with 7 additions and 0 deletions
+7 -0
...@@ -167,3 +167,10 @@ window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady = function iframeReady() ...@@ -167,3 +167,10 @@ window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady = function iframeReady()
isLoadingIframe = false; isLoadingIframe = false;
updateIframeContent(); updateIframeContent();
}; };
if (process.env.NODE_ENV === 'production') {
console.warn(
'react-error-overlay is not meant for use in production. You should ' +
'ensure it is not included in your build to reduce bundle size.'
);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment