In React Native projects, we typically use index.android.js
and index.ios.js
to differentiate between the same file for Android and iOS platforms.
But I wonder if it's possible to separate files based on the development and production environments as well. Could a tool like webpack
, a plugin, or even node
allow us to have files like index.develop.js
and index.js
(for production) and then require them using something like require('index')
?