create react app not picking up .env files?

前端 未结 10 2084
醉话见心
醉话见心 2020-12-12 19:52

I am using create react app to bootstrap my app.

I have added two .env files .env.development and .env.production in the root.

10条回答
  •  温柔的废话
    2020-12-12 20:30

    If the .env file works but .env.development or .env.production don't, then create an empty .env file alongside those two. I don't know why but this works for me.

提交回复
热议问题