monorepo (turborepo) importing specific files depending on platform

Hi there. I have a monorepo with a Next and a React Native application. I have a shared file that contains all of the same providers used in both apps. let's say one of the specific providers have to be set up in two different ways depending on if it is used for web or native. How would I accomplish this the best way, given that I would still want to use a shared file containing all providers? Is it possible to add on an extension for web like specificProvider.web.tsx and then this file is used for the import only on web (while the normal native specificProvider.tsx is imported on native)? So the import would be something like: '@providers/specificProvider' but it is essentially imported from 2 different environments depending on the platform. Cheers
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server