-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Describe the bug
The unmodified worker demo doesn't start the download, it only shows downloadZip is not a function error when trying to download.
The issue is that the worker.js produced by the build script is an ES-module, and needs hand-editing to turn it into an IIFE.
To Reproduce
Steps to reproduce the behavior:
- Clone the repo (I'm on commit c740db5)
- Run
npm run start - Start a web-server at the root dir of the repo (in my case
python3 -m http.server 8000) - Open http://localhost:8000/demo/worker.html in your browser
- Add https://raw.githubusercontent.com/Touffy/client-zip/master/CHANGES.md to the list of URLs
- Click
Download all that in one ZIP - Observe the
downloadZip is not a function
Expected behavior
Start the download (I haven't actually seen how the demo should work)
Workaround
Instead of compiling the scripts yourself, use a prebuilt worker.js from npm, GitHub Releases or remove module wrapper manually.
Desktop (please complete the following information):
- OS: Pop!_OS 22.04 LTS
- Browser: Chromium 105 with and without incognito mode. No extensions installed
- Browser: Firefox 104
Additional context
npm --version 8.15
node --version v16.17.0
python3 --version 3.10.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed