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
browserify doesn't replace NODE_ENV #267
Comments
This is true; it's pretty important to apply envify at the app level. I'm not sure how else to address this issue. The only other dep is |
Yea, one way is for the user to run custom global transform like:
which is something the envify docs don't even mention (probably because transforming Other solution is to go through all deps that react owns (such as EDIT: closed by mistake -- keep/close as you will |
Typically bundles are where the distinction matters, and bundlers do typically replace it in the entire bundle - it's not much of a problem for node. Perhaps you could file an issue on the react repo for |
It feels like removing the dependency on loose-envify would make sense. Referencing: facebook/react#27748 where this is discussed. |
Unless I misunderstand, resulting bundle from browserify still contains some
process.env.NODE_ENV
references because theprop-types
package depends on a another package that does not specifybrowserify.transform
in itspackage.json
. In particular, thereact-is
package (haven't checked if there are others).The
browserify.transform
is a non-global transform, thus it doesn't transform dependencies.The text was updated successfully, but these errors were encountered: