Can zip.js run in Node.js? #288
-
Hi, This looks like a great solution for one of my projects, performance looks to be impressive. Is this code compatible to be shared with both front end webdevelopment using React and Typescript and back end development (service) using NodeJS and TypeScript? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
This comment has been hidden.
This comment has been hidden.
-
I confirm it's possible to use zip.js (v2.3.19+) in Node.js (v14.8+) by polyfilling the |
Beta Was this translation helpful? Give feedback.
I confirm it's possible to use zip.js (v2.3.19+) in Node.js (v14.8+) by polyfilling the
Blob
and theWorker
APIs, see this example https://github.com/gildas-lormeau/zip.js/blob/3b9d2f2d789c95cddb4787f42a120c11b88dc7c5/tests/node/. The code in thetest()
function should run on client-side (i.e. in the browser) or server-side (in Node.js) without needing any change.