Need better logic for writing `index.html` meta tags
My website has different paths (rather than different host names) depending on the build config, like:
- http://mysite.example/BlazorSite/
- http://mysite.example/BlazorSite-Staging/
I'm using ServiceWorkerBaseUrl and ManifestBaseUrl to set the base accordingly.
However, this only works once. Once the index.html contains the manifest and service worker URLs, MSBuild no longer touches it:
Condition="'$(IndexLines.Contains($(ServiceWorkerRegisterFileName)))'=='false'"
This logic doesn't really work when switching between different URLs as described above.
Two possible approaches:
- don't edit the
index.htmlat all, but rather create an intermediary version - edit it, but improve the
Conditionsuch that the edited line can still be updated
Thanks for finding this - I'll see what can be done.
I've not forgotten - just been busy!
It's fine! Me too, actually. Probably won't get back to my Blazor project until mid-January.