package.jsonas per 6.1.5: Webpack with Express. If you haven't already, ensure those scripts are in
npm run buildand
npm start. Run
npm run buildlocally on the command line to observe what happens: Webpack compiles files into the
distfolder. Testing this locally can help us pre-empt any issues when deploying to Heroku.
distFolder to .gitignore
.gitignore. We do not want to commit our
distfiles to GitHub because
distwill contain imported code from
node_modules, code that can be re-installed with
npm iand re-Webpack-ed with Webpack on-demand. There is no need to store it in GitHub and bloat our repo. See
.gitignoreon GitHub here.