0.2.0 • Published 2 years ago
@reusable-web/sw-cache v0.2.0
@reusable-web/sw-cache
Create a file called sw.js
in the root folder of the project. This is significant since it sets the serviceworker scope to the root of the project.
importScripts('/node_modules/@reusable-web/sw-cache/sw.js')
Register the project serviceworker.
import SwCache from '/node_modules/@reusable-web/sw-cache/index.js'
const swCache = new SwCache()
swCache.register('/sw.js')
© 2021-22 Lloyd Brookes \75pound@gmail.com\.
Tested by test-runner.