If you aren't converting an app for the latest release, pass the -f|-framework option. To obtain static assets, use one of the following approaches:Ĭreate a separate, new PWA project with the dotnet new command in a command shell: dotnet new blazorwasm -o MyBlazorPwa -pwa Īdd the following ServiceWorker item to an ItemGroup: Convert an existing Blazor WebAssembly app into a PWAĬonvert an existing Blazor WebAssembly app into a PWA following the guidance in this section.Īdd the following ServiceWorkerAssetsManifest property to a PropertyGroup. ![]() The PWA scenario is independent of the hosting model. Optionally, PWA can be configured for an app created from the ASP.NET Core Hosted template. In the preceding command, the -o|-output option creates a new folder for the app named MyBlazorPwa. Use the following command to create a PWA project in a command shell with the -pwa switch: dotnet new blazorwasm -o MyBlazorPwa -pwa ![]() ![]() When creating a new Blazor WebAssembly App, select the Progressive Web Application checkbox.
0 Comments
Leave a Reply. |