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

Allow disabling React DevTools using a new environment variable #11551

Open
bobaekang opened this issue Oct 14, 2021 · 0 comments
Open

Allow disabling React DevTools using a new environment variable #11551

bobaekang opened this issue Oct 14, 2021 · 0 comments

Comments

@bobaekang
Copy link

Is your proposal related to a problem?

Currently, CRA apps do not have any way to fully disable React DevTools via an existing, webpack configuration-based solution (facebook/react#11448) and must resort to a more hacky solution such as the ones found here: facebook/react-devtools#191.

While it is possible to configure Webpack after ejecting, that seems too costly a solution for a simple change like this.

Describe the solution you'd like

Add a new boolean environment variable DISABLE_DEVTOOLS or DISABLE_REACT_DEVTOOLS to the advanced configuration list so that the webpack configuration based solution can be available without ejecting. The default value for this new environment variable may be set to false to match the current behavior.

Describe alternatives you've considered

As mentioned above, one existing alternative is to eject and directly configure webpack setting. But this seems not desirable/too costly for a simple change like this. Another is to use the aforementioned hacky solution.

Additional context

(Write your answer here.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant