Deploy React PWA to Tomcat Subfolder

I’m trying to deploy my Ionic React PWA to a subfolder on Tomcat.

I just run ionic build --prod and then copy the content of the build folder to my Tomcat subfolder.

The issue seems to be that the content still think it’s served from root of my domain ie https://example.com and not https://example.com/app/ where it really is located.

I have also tested changing the <base href="/" /> to both href="/app/" and href="https://example.com/app/" with no luck.

Any ideas really appreciated.