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
Common use cases for this include logic that's conditionally run depending on environment and API access keys that you don't want to hardcode. We should always support NODE_ENV and possibly any variables that start with a configurable prefix like create-react-app has REACT_APP_.
To implement this, I'm thinking add a <script> that sets window.process.env = { ... } instead of trying to parse and replace the usages of the variables in scripts. It might actually be more helpful during development to see the original code and look at the values with the devtools.
The text was updated successfully, but these errors were encountered:
Common use cases for this include logic that's conditionally run depending on environment and API access keys that you don't want to hardcode. We should always support
NODE_ENV
and possibly any variables that start with a configurable prefix likecreate-react-app
hasREACT_APP_
.To implement this, I'm thinking add a
<script>
that setswindow.process.env = { ... }
instead of trying to parse and replace the usages of the variables in scripts. It might actually be more helpful during development to see the original code and look at the values with the devtools.The text was updated successfully, but these errors were encountered: