@reusable-web/sw-cache
v0.2.0
Published
sw-cache
Downloads
28
Readme
@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 <[email protected]>.
Tested by test-runner.
