How to check Expo environment for Firebase

Hey

I’m completely new to Expo but I’ve been working with React Native for a number of years.

I’m currently building a react native module that has a dependency on Firebase - and I’m using https://rnfirebase.io/ when the module is added to a React Native non-expo project. However, I’ve discovered that Expo only works with the Firebase web sdk.

So basically I’m looking for a way to check if my module is running in an Expo or a vanilla React Native app to figure out which Firebase sdk to work with.

Is there an environment variable that expo exposes that I can check for?

Thanks!

Nick

Answering my own question…

it turns out you can have 2 files - file.expo.native.ts and file.native.ts and the former will get used/compiled by expo native and the latter by non-expo native