Problem:
When I open a blazor page from a class library (PWA enabled, ASP.NET core hosted, Configure for HTTPS), it contacts the server again. My desired/expected behaviour would be that it treats this page just like the pages included in the original client library.
Setup:
I have an empty blazor project (webassembly) and an additional Razor component class library.
I've changed the target framework of the class library to netstandard2.1 and altered the package references. It now looks like this:
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.5" />
<PackageReference Include="System.Net.Http.Json" Version="3.2.1" />
</ItemGroup>
</Project>
I've reference the class library in the App.Razor as follows:
<Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="new[] { typeof(SomeMicroservice.Client.Component1).Assembly }">
... standard generated found/not found code ...
</Router>
What works:
The page loads as expected (it shows static content)
What doesn't work:
When the browser goes into offline mode, the page cannot be loaded because it has to download items from the server. Other pages (included in the base client project) can be loaded offline (PWA isn't the issue here).
Everytime the page is visited the loading page appears (same issue, it has to download stuff)
Question:
Is it possible (if so, how?) to treat the page from the new class library as a page form the original class library? No downloads/loads, so that is works with PWA?