Production app only works when the homepage is left blank
Using pushstate-server the browser looks for a non-existent /proverb-generator/static/js/main.916a0ac9.js file when my package.json says
...
"homepage": "http://timurtu.github.io/proverb-generator"
...
It loads when I build leaving the homepage blank
...
"homepage": ""
...
Using https://github.com/timurtu/proverb-generator as the homepage property fails with the same error.
I saw a similar issue where it will only work with http but this error still occurs after removing the s.
Probably a duplicate of https://github.com/facebookincubator/create-react-app/issues/1335?
Scratch that.
If you build for GH Pages you can’t use pushstate-server locally like this. It will assume files exist at / whereas they exist at /proverb-generator. For now this is working as designed: you can either build for / path (and use pushstate-server) or build for /proverb-generator (and deploy to GH Pages).
I know this is not super convenient and we’ll need to look into it again as part of solving https://github.com/facebookincubator/create-react-app/issues/1094. Please subscribe to that issue if you’re interested.
I’m closing this specific issue since it is not actionable at the moment. This is just how it works right now.