Q: Angular, replacement for deployUrl in ASP.NET MVC project, with areas, for lazy loaded modules We use ASP.NET MVC with areas so a typical url may look like this
https://local:6789/_SomeIISFolder/Area/Controller/Index
we have deployUrl set to
"deployUrl": "Areas/Area/Views/AngularCommon/Ang/",
which you may notice isn't a url, it's a disk path, i.e. "Areas" and "Views" aren't path of the url, they are part of the disk path
The deployUrl is only needed because otherwise lazy loading files doesn't work, instead of a path like https://localhost:1234/_IISBit/AreaName/..../somelazyloadfile_ts.js the url becomes https://localhost:1234/somelazyloadfile_ts.js, which is annoying because without lazy loading it just works
The official documentation talks about replacing this with APP_BASE_HREF
https://angular.io/guide/deployment#the-deploy-url
but I can't see how to do this. We can't change the base href, and changing the APP_BASE_HREF doesn't seem to help
One thing that does work is something that seems like a real hack, in main.ts
declare var __webpack_public_path__: string;
__webpack_public_path__ = 'Areas/TheArea/Views/SomeFolder/Ang/';

