We used to use both .env.local and .env.production at the same time... But after upgrading to the latest react-scripts (v4) we got wrong resolving.
For react-scripts build script:
-.env.production.local, .env.production, .env.local, .env
+.env.production.local, .env.local, .env.production, .env
I believe dreact env-sync should generate file with different name in order not to be more prioritized than any other environment vars and also should be ignored by default .gitignore file. The best candidate seems to be .env.development.local.
Alternatively we can generate either .env.development or .env but ask to. put it into gitignore or do that automatically.