You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I configure to enable this? I can't find any docs to start with.
Also, how can I inject environment variables for expo web using metro bundler? Cause I conditionally load Storybook or the main app based on the value. I can inject variables using webpack via cross-env RUN_STORYBOOK='true' expo start --web previously but when I changed to metro bundler it does not seem to work?
When I console.log() the value of process.env it only contains NODE_ENV variable. So my main app will always be rendered instead of Storybook regardless of environment variable I set.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I've setup metro bundler for expo web to replace webpack and it works fine and I can see my app rendered on the browser.
I know that fast refresh does not work. However, on the docs it is mentioned that it is possible (via
@expo/metro-runtime
) here: https://docs.expo.dev/guides/customizing-metro/#expo-webpack-vs-expo-metroHow can I configure to enable this? I can't find any docs to start with.
Also, how can I inject environment variables for expo web using metro bundler? Cause I conditionally load Storybook or the main app based on the value. I can inject variables using webpack via
cross-env RUN_STORYBOOK='true' expo start --web
previously but when I changed to metro bundler it does not seem to work?When I
console.log()
the value ofprocess.env
it only containsNODE_ENV
variable. So my main app will always be rendered instead of Storybook regardless of environment variable I set.I'm not sure if this is the correct repository to post this question but I can see that the
@expo/metro-runtime
module is inside this repo: https://github.com/expo/router/tree/main/packages/expo-metro-runtime so I decided to post here. 😄Help is greatly appreciated! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions