-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
__DEV__ support #1580
Comments
That's something a bundler like webpack has to do for you |
could anyone anyone help me with how we could get |
when I add DEV to webpack plugins, it goes other error:
anybody could help? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem
If you want to share code between RN and RN-web,
__DEV__
should also be provided in the both platform.However I can't add DEV using
const __DEV__ = process.env.NODE_ENV !== 'production'; new webpack.DefinePlugin({__DEV__})
I can set
window.__DEV__
fine, but RN code uses__DEV__
I've also tried adding
module:metro-react-native-babel-preset
Expected behavior
Environment (include versions). Did this work in previous versions?
The text was updated successfully, but these errors were encountered: