Open aj-concirrus opened 2 years ago
I have the same issue. In our react
application we are using some environmental variables and I cannot make them to be read while running the application with npm serve
. However when runnning with webpack
or vite
development server there is no issue. Does serve
allows to access process.env
or is there any other solution for that?
For anyone finding themselves here — the process.env
variable is evaluated at build time, i.e. when npm run build
or equivalent happens. Make sure the variable is present at the time of building!
Hi there,
I have been having some issues using
serve
correctly. What I know is:Any experience being unable to consume environment variables using
serve
?