Adding the dist in the git repo can result in breaking changes in different environments.
This can be easily fixed by adding the /dist in the .gitignore file.
Fix :
.gitignore
The dist would be built when the app is going to be deployed by using the npm run build or yarn build scripts or as specified in the package.json