react-boilerplate / react-boilerplate-cra-template

:fire: Setup Create React App with React Boilerplate. Highly scalable & Best DX & Performance Focused & Best practices.
https://react-boilerplate.github.io/react-boilerplate-cra-template/
MIT License
1.87k stars 395 forks source link

[Question] Why does this template add `.env.local` to source control? #148

Closed cshamrick closed 3 years ago

cshamrick commented 3 years ago

According to the Create React App documentation, .env*.local files should not be checked into source control:

.env files should be checked into source control (with the exclusion of .env*.local).

This recommendation is also reflected in the default cra-template.

Why does react-boilerplate-cra-template add .env.local to source control? Is this not contradictory to the official CRA docs? I'm not saying it's wrong... I'm working with a team that is discussing different approaches for managing .env* files within a project, and we'd like to understand the thought process behind the design decision that was made for react-boilerplate-cra-template to determine if it is right for us.

Can-Sahin commented 3 years ago

It belongs to the template, not the local settings for this repo development. That's the catch. Just name is confusing because this is a starter template and should include all the settings initially. CRA is not a template but a bootstrap tool