Closed guioum closed 7 months ago
The framework takes care of generating the required prefix for Expo and Nextjs during install time.
All that's required is to define PUBLIC_
once, and the bun install
postinstall runs a script to move the env vars into where they need to be.
Thanks, I just did what you said.
I did a bun install
then checked the generated .env.local in apps/expo but all generated variables start with the EXPO_ prefix. Thus, when getImageUrl (executed from expo) tries to get process.env.NEXT_PUBLIC_APP_URL, it doesn't exist.
(I use two terminals, one for bun dev
, one for bun ios
to run in the simulator)
Hmm you may have a point there. We need a flag for the expo environment and decide the var based on that. I'll do some investigating.
Thanks for calling this out!
Fixed this issue in the latest push. We have separate providers for Expo and Next.js, so no env flag required!
No images when running expo.
In solito-image, index.tsx uses:
process.env.NEXT_PUBLIC_APP_URL, but it's not available in expo.
Replacing this with process.env.EXPO_PUBLIC_APP_URL solves it.