Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to suppress DevTools logs and warnings #11448

Merged
merged 1 commit into from
Nov 4, 2017
Merged

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Nov 4, 2017

Addresses #3877.

The idea is that the people who need it can shim the __REACT_DEVTOOLS_GLOBAL_HOOK__ global in their webpack/browserify configs with an object like ({ isDisabled: true }).

Basically same approach as I suggested in #3877 (comment), but doesn't produce an extra warning.

@aaronjensen
Copy link

aaronjensen commented Nov 4, 2017

Looks good to me! Thanks!

@gaearon
Copy link
Collaborator Author

gaearon commented Nov 4, 2017

Verified that

    new webpack.DefinePlugin({
      '__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })'
    }),

is enough to make it disappear.

@gaearon gaearon merged commit 8de8be0 into master Nov 4, 2017
@gaearon gaearon deleted the gaearon-patch-2 branch November 23, 2017 18:36
Ethan-Arrowood pushed a commit to Ethan-Arrowood/react that referenced this pull request Dec 8, 2017
bobaekang added a commit to chicagopcdc/data-portal that referenced this pull request Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants