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
is there a way to include the NODE_DEBUG environment inside a React App?
As React filters all env variables our that aren't prefixed with REACT_APP_<name>.
best Minh
The text was updated successfully, but these errors were encountered:
If you'll provide some *_DEBUG env variable for you react app during build, this will hardcode that value in your code and it won't be possible to change it later at runtime. Do you really want this?
In any case, you can pass REACT_APP_DEBUG during build and then somewhere before running your app just mirror this value in localstorage:
I didn't mean to hard code it into build. I want to run it in development and I think the env variable NODEDEBUG gets filtered out by the react app since it only allows prefixed eng variables to be accessible in the app.
So when I initialize the logdown in some file in the app, it can not access the env Variable to check if the console logs are enabled or disabled.
I created now a separated file that imports logdown and sets the state by a react env variable. Do enable and disable the logs .
Hi,
is there a way to include the NODE_DEBUG environment inside a React App?
As React filters all env variables our that aren't prefixed with
REACT_APP_<name>
.best Minh
The text was updated successfully, but these errors were encountered: