robbederks / downzip

NPM library to enable client-side code to stream potentially large files into a zipped download
MIT License
35 stars 12 forks source link

Add async register method #17

Closed keith-waters closed 3 years ago

keith-waters commented 3 years ago

This PR does a few things:

Thanks for a great repo! It's allowing us to download images and zip images with only the browser. :)

robbederks commented 3 years ago

Thanks for the PR. Always good to be as generic as possible, and I think the async register function will only help in the future. Not very familiar with the scriptUrl, and in which scenarios you'd want to change it from the default value. Could you elaborate that a bit? Will merge and push a new version to npm when when I find some time :)

keith-waters commented 3 years ago

With regards to scriptUrl: I was able to change the service worker url locally during testing. (Our frontend and backend code are served on different ports in dev env)

keith-waters commented 3 years ago

Realized mapScriptUrl will not work until service-worker-loader is updated. Triple checking to make sure it works before adding it here. 😬 Thanks for your patience!

robbederks commented 3 years ago

Thx! Rebased and rebuilt this, and merged in (see PR #19). Will also push the new version to NPM