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
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
-
Hey all,
I'm using Remix with Vite for dev but then later on with AWS.
Before the move to Vite, the server side code was able to read the
process.env
variables and I would very much like to keep this functionality.I have a few variables encoded at build time with vite's
define
config but a few things must be runtime configurations for my setup.Funnily enough the code does see the process.env variables but for whatever reason it can't use them.
In this example the console.log logs out the vars but then proceeds to construct the auth options with undefineds.
I've tried with or without importing dotenv/config in my entry.server.tsx, it doesn't seem to make a difference.
I need to mention that this is only an issue with
remix vite:dev
. Theremix vite:build && remix-serve build/server/index.js
works like a charm.Beta Was this translation helpful? Give feedback.
All reactions