So there's, in my view, a better way to do this. The issue is by removing dist from the gitignore, every time you're committing to your main repo, you're committing all these changed dist files which is a bit annoying. Also when you're pushing to Heroku, it's pushing in all the non-built files as well, and other things it doesn't need.
What you can do instead is create a new git in the dist directory and push that to heroku. This won't work out of the gate, what you need to do is:
Now you're not tracking every change to a distribution file in your main git repo. You could script the above to make the process even easier.