Closed michalpaukert closed 4 years ago
This is actually how react-scripts works. It's an intentional feature. cross-env is doing things correctly. It's just that react-scripts wont make all env variables available to your frontend code.
Read more: https://create-react-app.dev/docs/adding-custom-environment-variables/
Good luck :)
cross-env
version: 6.0.3node
version: 12.13.0npm
(oryarn
) version: 6.13.1What you did:
What happened:
Reproduction repository:
Problem description: When I run my package.json script I cant get my custom variable, it only works when I use REACTAPP* variables or NODE_ENV
Suggested solution: create process env variables for every custom variable.