Skip to content
Workbox integration to a Blazor WebAssembly app to get offline support
HTML C# CSS JavaScript Batchfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aspnetcore-prerendering
blazor-workbox-pwa
.gitignore
README.md
blazor-prerendering-pwa.sln
run-debug.bat
workbox-config.js

README.md

Install Workbox CLI

npm install workbox-cli --global

Dev

dotnet build
CD blazor-workbox-pwa
xcopy wwwroot\* .\bin\Debug\netstandard2.0\dist /Y /E
workbox generateSW workbox-dev-config.js
dotnet watch --project aspnetcore-prerendering\aspnetcore-prerendering.csproj run

Prod

dotnet publish -c Release
workbox generateSW workbox-config.js
CD .\aspnetcore-prerendering\bin\Release\netcoreapp3.0\publish\
dotnet aspnetcore-prerendering.dll

MSBuild integration

https://docs.microsoft.com/en-us/visualstudio/msbuild/target-build-order?view=vs-2019 https://docs.microsoft.com/en-us/visualstudio/msbuild/exec-task?view=vs-2019

Box by Rockicon from the Noun Project

You can’t perform that action at this time.