I have an Angular 16 application that is going to be run from a third party application using Microsoft WebView2. This third party application expects the content for my Angular application to be hosted on an internal WebSphere (or Tomcat) server (depending on where it is installed).
This works however making changes to the Angular application is time consuming as someone has to go into every client, update the code and refresh the web server through a proprietary refresh application (Yes, it is painful).
I’ve played around with hosting the .js files on an external Azure web application while keeping the index.html and the assets folder on the internal web host. I simply updated the index.html to point to the external files and for the most part it is working with the exception of the chunk files.
I currently have 3 chunk files (456.js, 484.js and 896.js) for some third party libraries I’m using in my Angular code that I can’t move to my external web server as I can’t find a way to point to them from the index.html file.
Is there any way I can get my Angular application configured so all of the .js files are stored on a remote host while at the same time keeping the index.html and assets folder on the local WebSphere/Tomcat server?
Thanks in advance.
I updated the index.html file and pointed every .js and .css file to my external Azure web application. I deleted all of the .js and .css files from the third party WebSphere server to find the Angular application would not work until I put the 456.js, 484.js and 896.js chunk files back in the same folder as the index.html file.
I did also try playing with the base href value with no luck as it appears to only work within sub-folders of the primary application folder.
John Simpson is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.