YouTube.js
YouTube.js copied to clipboard
fix: Make "deno" conditional export have higher precedence than "node"
Fixes the issue encountered in https://github.com/LuanRT/YouTube.js/issues/965
Currently, deno never uses the "deno" conditional export in package.json as conditional exports are matched in the order they are specified, and deno supports both the "node" and "deno" conditions.
This means that users need to apply workarounds for e.g. the fetch function, while this would work out of the box with the "deno" export.
This change should fix execution with deno and make it work out of the box, without impacting other targets such as Node.js since those don't support the "deno" export