Move DEV only module requires into __DEV__ blocks#10185
Merged
trueadm merged 4 commits intofacebook:masterfrom Jul 19, 2017
Merged
Move DEV only module requires into __DEV__ blocks#10185trueadm merged 4 commits intofacebook:masterfrom
trueadm merged 4 commits intofacebook:masterfrom
Conversation
Collaborator
|
Do you mind rebasing this? |
Contributor
Author
|
@gaearon Done just now, please give it another check when you have time :) thanks! |
gaearon
reviewed
Jul 19, 2017
| if (__DEV__) { | ||
| var warning = require('fbjs/lib/warning'); | ||
| var {getCurrentStackAddendum} = require('ReactComponentTreeHook'); | ||
| var {getStackAddendum} = require('ReactDebugCurrentFrame'); |
Collaborator
There was a problem hiding this comment.
This looks like code change?
Collaborator
|
Let's get this in. It's not a long term solution but at least it's consistent with what we already do. |
Contributor
Author
|
Cool :) Thanks |
Contributor
|
@trueadm I noticed that in some files there remain invocations of Sorry if commenting on already merged PRs is not recommended, figured I’d try this rather than create a new GitHub issue |
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.
This is related to #10176. Dangling
require()calls were created from the build due to the usage not being in a__DEV__block within the source code. This PR aims to move the require calls so they no longer dangle in the production builds.Also, the need to have single quotes within
modulesToStubblocks has been removed – it was error prone.