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
This allows me to access MY_VAR from context in my Loaders, this is great! When developing locally these aren't set and there is no way to do this other than reading from process.env.
Suggestion
I might be oversimplifying this but if in remix.confg.js we could export an additional prop e.g. devAppLoadContext we would be able to have something like the code below, meaning the app source code no longer has to patch anything accessing process.env.
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
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to suggest we add the ability to supply an
AppLoadContext
that would be consumed byremix dev
.Why?
This would be really helpful when developing locally and deploying to Cloudflare workers.
Current implementation
In my
server.ts
I add my wrangler vars to my context as shown below.This allows me to access
MY_VAR
fromcontext
in my Loaders, this is great! When developing locally these aren't set and there is no way to do this other than reading fromprocess.env
.Suggestion
I might be oversimplifying this but if in
remix.confg.js
we could export an additional prop e.g.devAppLoadContext
we would be able to have something like the code below, meaning the app source code no longer has to patch anything accessingprocess.env
.P.S. Thanks for building remix, it's great!
Beta Was this translation helpful? Give feedback.
All reactions