Multiple platforms - build configuration question
dstudzinski opened this issue · comments
Hi, Could you explain how build tools 'knows' which files to import?
For example when you use import Render from './KeyRender';
how it knows if choose KeyRender.js, KeyRender.android.js or KeyRender.ios.js?
I can't find place where it's configured. For example when I want to change suffixes from .android.js to .myandroid.js which config should I edit?
EDIT:
Ok, I think I found it: https://facebook.github.io/react-native/docs/platform-specific-code.html#platform-specific-extensions
So react-native uses .android.js or .ios.js files (if exists - if not rn uses .js files)
Webpack (used for desktop and web) uses .js files