cra-replace-service-worker

0.0.8 • Public • Published

This package replaces Create React App's service worker with you own service worker without ejecting. This package also adds a variable 'PRECACHE_FILES' to your custom service worker. It contains a list of file-paths to all CRA files generated inside the 'build'-folder.

#Usage# In your package.json under scripts add the following:

"replace-sw": "cra-replace-service-worker ./src/your-custom-sw.js"

Enjoy!

Package Sidebar

Install

npm i cra-replace-service-worker

Weekly Downloads

1

Version

0.0.8

License

MIT

Unpacked Size

2.58 kB

Total Files

3

Last publish

Collaborators

  • fredrik.ward