madskristensen / WebEssentials.AspNetCore.ServiceWorker

Other
342 stars 61 forks source link

Can not Modify manifest.json #63

Open alexwijoyo opened 5 years ago

alexwijoyo commented 5 years ago

Hi, I use "WebEssentials.AspNetCore.PWA" Version="1.0.33"

With manifest.json location: /wwwroot/manifest.json

I messed up with my first manifest.json but when I modified it nothing happened. Browser still loads the old manifest.json (manifest.webmanifest). How do I modify the manifest.json. Thanks.

AFM-Horizon commented 4 years ago

Anyone still having trouble with this?

Kraegon commented 3 years ago

I am, using version 1.0.65. I used a template from Visual Studio 2019 to set up an basic Angular+ASP.NET Core 2.1.7 app and added this package to the project. Whenever I try to run the app in IIS express or publish the website to IIS using Web Deploy, it does not seem to generate a new manifest.webmanifest.

Kraegon commented 3 years ago

For some reason this was present in my csproj file.

<ItemGroup>
    <Content Remove="wwwroot\manifest.json" />
</ItemGroup>

After removing that and making sure the manifest.json was set to copy to the output directory, it did work. The https version seems to still use a cached version, though. This is how I registered the PWA:

services.AddProgressiveWebApp(new PwaOptions() { CustomServiceWorkerStrategyFileName = "ServiceWorker.js" , RegisterWebmanifest=true, RegisterServiceWorker=true});