-
Notifications
You must be signed in to change notification settings - Fork 9
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
Modifying process.env.NODE_ENV breaks React #62
Comments
Humm... According to this line https://github.com/PEM--/meteor-helper/blob/v0.29.0/lib/meteor-helper-view.coffee#L194, |
And from what I recall from React's source, code is only added when |
Wow, thanks for the quick response @PEM--! 😊 Did you see the React links in the OP? The first one defines a function when |
Indeed, I've seen it. Nuclide should not be shipped in development mode if they rely on React. |
Same stuff for What's surprise me is that I don't get this issue on my setup... Anyway, shipping code in dev mode seems a bit... well... humm... anyway 😄 |
Hm…Well, Nuclide isn't shipping code "in dev mode," really (it's a runtime switch in React). But I see where you're coming from. Ideally, switching wouldn't be possible I suppose. But practically, I think this is the best choice for Nuclide if we want to have dependencies that require React. (Bundling would be a big overhead.) Can I ask why meteor-helper has to change the current process's |
Q: Can I ask why meteor-helper has to change the current process's NODE_ENV? Q: Couldn't it just pass a modified version to the BufferedProcess? |
Will do 😉 Pretty stoked on the fact that Atom's will be using React. Nice move 👍 EDITED: Well, Atom is getting back on React. Nice, nice, nice 😄 |
React has some places where it conditionally defines and calls functions. In the compiled version of React, the condition used is
process.env.NODE_ENV === 'production'
. Since_modifyProcessEnv()
changes this value at runtime, React can wind up not defining the function, but then later attempting to call it. This seems to be the root cause of facebookarchive/nuclide#1172 and steelbrain/linter-ui-default#212.The text was updated successfully, but these errors were encountered: