We have an Ionic application which we have just migrated from Ionic 5 to Ionic 6 and Angular 10 to Angular 13. The app is served on the web as well as deployed to the native Android and iOS Stores.
When we deploy to the web server the app does not load and we get errors. The problem seems to be that the baseHref setting in our angular.json file is now being ignored.
In angular.json we have one configuration for our device builds and one for our web builds. In the web build configuration we have this:
"baseHref": "/web/"
This works find when we deploy out Ionic 5 / Angular 10 web files but when we deploy the migrated app we get errors loading asset files where it tries to load from
https://server-name/styles.7a9185c86c702a3f.css
where it should be loading from
https://server-name/web/styles.7a9185c86c702a3f.css
I can’t find any documentation anywhere for Angular 11, 12 or 13 that suggests there was a breaking change for this. Does anyone know what I need to do in my angular.json file to get this to work?
3 posts - 1 participant