Reputation: 1
Someone please help me with below
i have installed npm i env-cmd
i have 2 files in the src folder
.env.development
REACT_APP_URL="DEVELOPMENT"
.env.production
REACT_APP_NAME="PRODUCTION"
package.json file
"start": "env-cmd .env.development react-scripts start",
"build": "env-cmd .env.production react-scripts build",
But i get nothing while do this in app.jsx
i also dont get any error in cmd
Upvotes: 0
Views: 669
Reputation: 7642
well you have REACT_APP_URL
in dev but you're trying to access REACT_APP_NAME
so of course it doesn't work
change this: REACT_APP_URL="DEVELOPMENT"
to REACT_APP_NAME="DEVELOPMENT
and it should work
Upvotes: 1