Heroku Deployment

#2 · closed · 0 comments

View on GitHub ↗

rexonms

I had issue when my project deployed to Heroku. After 5+ hrs of debugging finally figured it out the issue and wanted to share it with the community. When I build the package and upload to Heroku for some reason the .js files weren't found and it was send me the original HTML!! I was able to resolve the issue by adding the build script in package.json scripts/postinstall ` "postinstall": "NODE_ENV=production npm run clean && webpack -p", ` By adding this, when the project is pushed to Heroku, it creates new .js files and update the index.html, which resolved the issue.

Comments