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
I've seen React Native - __DEV__ is not defined
/* global __DEV__ */
works, but hope there's a way to fix it without modifying all source which uses __DEV__