Closed joshwingreene closed 1 year ago
@coreyshuman The demo doesn't have any audio. For reference, I never add sound to my demo videos. I'll make this clear in the future.
Thank you for making that edit! I had a feeling that I was missing a file type when I was reviewing workbox's globPatterns property.
Changes
vite-plugin-pwa
package in order to add PWA caching capabilities. ItsVite-PWA
method was added to the vite config file.manifest.json
file since the aforementioned plugin generates themanifest.json
file for usenvironment.prod.ts
file was edited in order to direct requests to the local backend server instead of the staging server. This was an intentional change since these caching features are only available when we are targeting production.preview
property to the vite config file in order to make the production port4200
Purpose
Adds caching for the app's shell (no data is cached)
Approach
Vite's
vite-plugin-pwa
package was added in order to add caching capabilities. This PR uses thegenerateSW
approach for registering and activating a service worker. This means that the app will register and activate the service worker for us.Learning
Vite's Documentation was very useful. Here's the link: Getting Started | Guide | Vite PWA
Demo
Note: GitHub isn't allowing me to upload files at the moment. So, I used Google Drive instead.
Adds caching for the app's shell
Testing Steps
develop
branch.npx vite build
npx vite preview