I have started a new Ionic 4 project and have began to slowly migrate over pieces of an Ionic 3 app. Everything about Ionic 4 has been great so far, except deployment. Developing and serving locally causes no issues and the app runs fine, but early on I happened to notice the output in the /www directory was very different from what I was used to in Ionic 3. I decided to copy over and try to run the app on a web server like I had always done. With Ionic 4, this is causing issues and giving me a “Failed to load resource: net::ERR_FILE_NOT_FOUND” error for a few files. I desperately need to figure this out soon, so I can decide if it will be worth continuing the upgrade, or sticking with Ionic 3. Help will be very much appreciated.
After being presented with a blank screen, here’s the browser console
It was an issue with <base href="/"> in index.html not being set to the correct subdirectory. I was so used to navigation in Ionic 3 I forgot how differently Angular router behaved.