madskristensen / WebEssentials.AspNetCore.ServiceWorker

Other
339 stars 61 forks source link

Need a way to configure WebManifestRoute constant. #15

Open cyrus-za opened 6 years ago

cyrus-za commented 6 years ago

I saw in the source code that the route where the browser asks for the web manifest is configured on the WebManifestRoute constant. How do I modify it? My intellisense doesn't show any option when creasting a new PwaOptions object.

PS. Pretty new to the dotnet core side of things. Haven't used MS stack in 5 years.

This is needed due to hosting on IIS on a different base route such as domain.com/AppName

cyrus-za commented 6 years ago

Update: For now I have managed to hack it by setting "registerWebmanifest": false inside appsettings.json and then adding the head manually to my layout.cshtml with

<link rel="manifest" href="~/manifest.webmanifest">

This seems to work, but it is not ideal.