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
3 merge requests!12191Lim.Pisey.168:/Identified - We are currently investigating reports of missing build logs. The issue has been identified and a resolution is in progress. We will provide a further update when available.Mar 21, 09:02 UTC,!12853brikk,!5717Automatically extract project file structure from build bundle file
Showing with 7 additions and 0 deletions
+7 -0
......@@ -167,3 +167,10 @@ window.__REACT_ERROR_OVERLAY_GLOBAL_HOOK__.iframeReady = function iframeReady()
isLoadingIframe = false;
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