Why is Netlify .env.NODE_ENV always set to production even though I set it to development?

Viewed 315

I inherited someone else's project. They are deploying a reactjs project with Netlify. I have this environment variable set:

enter image description here

In my code, I put a console.log(process.env);. After Netlify builds and deploys the website, my browser developer console shows this:

enter image description here

The Netlify documentation states that NODE_ENV is set to development by default. How do I set my environment to development?


NOTE:

I'm also using yarn build to build the project. I wonder if yarn build has rules that ignore my NODE_ENV variable and forces environment to be production, as a way to ensure developers never release a dev version?

0 Answers
Related