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 'DEV' flag #9569

Closed
flarnie opened this issue May 1, 2017 · 4 comments
Closed

Add 'DEV' flag #9569

flarnie opened this issue May 1, 2017 · 4 comments
Assignees
Milestone

Comments

@flarnie
Copy link
Contributor

flarnie commented May 1, 2017

We want to have a check for whether React is in 'DEV' mode, which would work for all previous versions of React.

@flarnie flarnie added this to the 15.6 milestone May 1, 2017
@flarnie flarnie mentioned this issue May 1, 2017
49 tasks
@gaearon
Copy link
Collaborator

gaearon commented May 2, 2017

which would work for all previous versions of React.

I think this is a non-goal (as it's something we'd implement on DevTools side with duck type checks etc). Just providing a boolean as an argument to the inject call should be enough.

@gaearon
Copy link
Collaborator

gaearon commented May 2, 2017

One thing we need to ensure is it highlights in DEV mode even if React thinks it's in prod mode. For example if you set process.env.NODE_ENV to "production" but don't uglify (and thus get deoptimizations caused by code in DEV blocks).

@gaearon
Copy link
Collaborator

gaearon commented May 2, 2017

Also the opposite: it should show as DEV if you uglify but don't set process.env.NODE_ENV to "production". Tricky 🤔

@gaearon
Copy link
Collaborator

gaearon commented May 3, 2017

I think this was fixed in #9586, and we won’t be bringing it to 15.x.

@gaearon gaearon closed this as completed May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants