Use env variable to disable clearConsole (#2495)#3288
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
Hello! I'm a bot that helps facilitate testing pull requests. Your pull request (commit bf995a8) has been released on npm for testing purposes. npm i react-scripts-dangerous@1.0.15-bf995a8.0
# or
yarn add react-scripts-dangerous@1.0.15-bf995a8.0
# or
create-react-app --scripts-version=react-scripts-dangerous@1.0.15-bf995a8.0 folder/Note that the package has not been reviewed or vetted by the maintainers. Only install it at your own risk! Thanks for your contribution! |
gaearon
left a comment
There was a problem hiding this comment.
There's no need to start it with REACT_APP_ because you aren't going to read it from your app.
I'm hesitant to add an extra variable just for this. Are there more similar things people who want this usually want? Or maybe there's some existing conventional env variable other tools already use for this?
|
@gaearon sounds legit. |
|
Using the name It would be ideal to be able to disable this functionality without any side effects, in which case using a prefix like |
|
It doesn’t really need to be a short name as it probably will be set only within And obviously this is just a minor behavioral change. I wouldn’t overthink it too much. I personally don’t mind both suggestions. What I’d suggest is setting up a more generic variable with a What do you think? |
|
Sounds reasonable! 👍 |
As discussed in the PR (#3288), it might be better to be a little bit more specific, yet generic enough so others might use this env variable for their own features.
|
there is a way to achieve the same functionality for people that wanted this right now, #2495 (comment) |
|
Environment variables prefixed with |
|
Any news on this? Please can we add REACT_APP_NO_CLEAR_CONSOLE env var. Using Windows, OSX, Linux is a nightmare! |
|
You can do the following trick: #2495 (comment) |
|
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. |
|
This pull request has been automatically closed because it has not had any recent activity. The conversation will be locked in 7 days unless the pull request is reopened. Thank you for your contribution. |
This PR allows disabling clearConsole by providing the env variable
DEBUG(suggested here and here).How this works?