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

Support React Native's global variable __DEV__ #157

Merged
merged 1 commit into from
Mar 30, 2022
Merged

Conversation

malash
Copy link
Collaborator

@malash malash commented Mar 30, 2022

__DEV__ is a React Native's specific global variable that might be used in some 3rd-party .native.js files.

For example, @apollo/clientdepends on this variable and try to patch it within global. But unfortunately Mini Program runtime doesn't have a valid global variable. So both the __DEV__ and its patch fail to work.

image

In this PR I use webpack.DefinePlugin to replace all __DEV__ usage in source code so the bug should be fixed.

@malash malash merged commit 89e149b into master Mar 30, 2022
@malash malash deleted the add-missing-dev branch March 30, 2022 06:21
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

Successfully merging this pull request may close these issues.

None yet

2 participants