teambit / envs

Component development environments for the Bit community
https://bit.dev/bit/envs
Other
63 stars 9 forks source link

[react-native] platform specific code #69

Closed oxyii closed 4 years ago

oxyii commented 4 years ago

I'm new in bit. I have no luck to find solution in docs. Please help to configure bit resolver for platform-specific code like noted in this comment I had a error:

 non-existing dependency files (please make sure all files exists on your workspace): 
          Component/index.js -> ./Component

My component folder structure:

index.js // <- export { default } from './Component'
Component.android.js
Component.ios.js

Both variants (android + ios) must be included into build

GiladShoham commented 4 years ago

Hi, this will be handled under - https://github.com/teambit/bit/issues/2215

oxyii commented 4 years ago

@GiladShoham Thanks for your reply but this is not a solution exactly... it's actually easier than it sounds... The only thing I need is to explicitly list the supported file extensions. Something like resolveModules but for file extensions. Something like Webpack extensions resolver. But it must include into build all found files instead of first matched

oxyii commented 4 years ago

Ok, sorry for dup. Let's continue in https://github.com/teambit/bit/issues/2215