Hi Vega team,
I’m in the making of a prototype app that would compile to Vega and other platforms. The only thing that I’m missing form having a setup that would satisfy my needs is the support for “platform-specific file extensions”.
For example:
I have a Button.tsx component and I can include it easily in all platforms. I already configured other platforms, so that whenever there is Button.platform.tsx next to Button.tsx, the .platform component will be loaded instead for given platform. Otherwise the generic Button.tsx is used. This is extremely handy for providing platform-specific implementations of existing components.
However, what I’m struggling with is to make the same behaviour for Vega. So my expected outcome would be, that whenever I have Button.tsx component, and next to it there is Button.vega.tsx, the .vega one would be included in the Vega build instead of the generic Button.
Is this already possible?
So far I tried using Metro’s custom resolution resolver.resolveRequest, however this had no effect. Passing platform: ‘vega’ as a CLI argument also doesn’t work.