Blazor.PWA.MSBuild icon indicating copy to clipboard operation
Blazor.PWA.MSBuild copied to clipboard

Need better logic for writing `index.html` meta tags

Open chucker opened this issue 6 years ago • 3 comments

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.html at all, but rather create an intermediary version
  • edit it, but improve the Condition such that the edited line can still be updated

chucker avatar Nov 19 '19 18:11 chucker

Thanks for finding this - I'll see what can be done.

SQL-MisterMagoo avatar Nov 21 '19 00:11 SQL-MisterMagoo

I've not forgotten - just been busy!

SQL-MisterMagoo avatar Dec 18 '19 14:12 SQL-MisterMagoo

It's fine! Me too, actually. Probably won't get back to my Blazor project until mid-January.

chucker avatar Dec 18 '19 21:12 chucker