@reusable-web/sw-cache

0.2.0 • Public • Published

view on npm npm module downloads Gihub repo dependents Gihub package dependents Build Status Coverage Status js-standard-style

@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.

/@reusable-web/sw-cache/

    Package Sidebar

    Install

    npm i @reusable-web/sw-cache

    Weekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    4.87 kB

    Total Files

    4

    Last publish

    Collaborators

    • 75lb