After building an ionic v3 app with
ionic build, I am able to open the index.html file in my browser to test the app.
However with an ionic v4 app, if I open the index file I get a blank page. Inspecting the network tab shows that it is unable to fetch the app resources (runtime.js, polyfill.js, styles.js, vendor.js, main.js and favicon.png).
I can resolve the loading issue by commenting out the
<base href="/" /> in index.html, but I still get a blank page, with the error
Error: No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.
I am testing with a new blank template in both cases. I have the same issue if I use
Steps to reproduce:
ionic start test blank --type=angular cd test ionic build
Open index.html in browser.
What am I doing wrong?