GenerateIndexHtml invalidates the modifications done by GeneratePWAContent:
Possible solution:
html = html.Replace($"\"./", $"\"{WebAppBasePath}{_remoteBasePackagePath}/");
html = html.Replace($"\"{WebAppBasePath}{_remoteBasePackagePath}/{Path.GetFileName(PWAManifestFile)}", $"{WebAppBasePath}{Path.GetFileName(PWAManifestFile)}");
GenerateIndexHtml
invalidates the modifications done byGeneratePWAContent
:Possible solution:
The PWA manifest must always be at the root.