Ensure release mode redux#7328
Merged
Merged
Conversation
| "browserify": { | ||
| "transform": [ | ||
| "require-globify", | ||
| "envify", |
Contributor
Author
There was a problem hiding this comment.
No need to specify this in configuration if we're defining it inline in the build command.
Since we're no longer passing a custom configuration we might want to define it here instead of the build command, but I'm not sure what that does to the ordering of the transforms, and we're currently doing envify after babelify.
Contributor
|
lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@Bjvanminnen noticed the following warning in App Lab on production, following the release of #7148:
We tracked the warning down to this clever function in redux which checks an undocumented dependency on a certain build environment. We already do this properly for React in code-studio, but we only load redux in apps and missed that we weren't putting it in production-mode correctly.
To fix, we make sure to set
NODE_ENV=productionfor all of the release build process, not just as a config option to our envify transform. Before we were only replacing instances ofprocess.env.NODE_ENVin our own code - now it happens in included node_modules as well. We also switch to loose-envify as recommended by the redux warning message.