Closed Hexagon closed 1 year ago
Thank you for the suggestions. I added the dual-mode support quite recently and I did not check if the package.json should have been impacted. Also, I did not originally plan for the library to be compatible with Node.js. I'm going to merge your PR.
Your changes have been published on NPM in the version 2.6.63. Thank you :)
Cool, will try it out later today 👍
Oh yeah, works!
dnt is producing node-code where both the cjs and esm code relies on the npm package.
Used import {...} from "https://deno.land/x/zipjs@v2.6.63/index.js"
in deps.ts
... and the following mapping in the dnt script
mappings: {
"https://deno.land/x/zipjs@v2.6.63/index.js": {
name: "@zip.js/zip.js",
version: "^2.6.63"
},
},
Thank you for the feedback!
I'm encountering errors while trying to use zip.js along with dnt (deno-to-node-transform). I'm pretty sure that the root cause is that zip.js has an incomplete package.json.
For a dual mode (esm+cjs) Node+Deno package, there is a couple of requirements. To support both the past and the future. I've found that this approach works best:
See # 28 and # 136 here for some background -> https://github.com/Hexagon/croner/issues?q=is%3Aissue+package.json+is%3Aclosed
Can send you a PR on this if you're interested