Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to extend the service worker definition for additional configuration? #17

Open
bancroftway opened this issue Jan 15, 2020 · 2 comments

Comments

@bancroftway
Copy link

bancroftway commented Jan 15, 2020

I would like to be able to extend the generated service worker with some workbox backgroundsync configuration. What would be suggested way to extend the generated service worker?

Could there be a way by which the build process can take a specified .js file and merge it into the generated file?

@chucker
Copy link
Contributor

chucker commented Jan 15, 2020

Could there be a way by which the build process can take a specified .js file and merge it into the generated file?

Theoretically, sure.

Do you have an example of what your custom JS would look like? (I’m not very familiar with Workbox.)

@SQL-MisterMagoo
Copy link
Owner

You can just edit the service worker to add that in.
I don't have any plans to incorporate something like workbox as you could just use it on is own and I'd like to keep this simple.
However, if someone felt strongly enough to add support for it, I would accept a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants