I have already built my (React in my case) app many times with
npm run build
so I have an exiting build directory with the result.
The problem is that every time I do a build I get a bunch of changes showing up in git that are from the build in build/
and not from the code development process itself.
In addition, the build/
directory already existed so by ignoring it now I may be left with an old version that is out of date in my source control. If I actually remove the directory that will show as a big change and then it will be replaced again when I do the build. What to do?