Hi, I hope this is the right way to contribute here -- it seemed like a small enough suggestion that a preceding issue would have been too much.
I'm currently experimenting with a react project using deno, but I can't import the types for react-use-websocket. This isn't terribly surprising since deno has its own rules, and as a result (edit: of deno's rules) I have been importing react-use-websocket via either esm.sh or skypack which are deno-friendly CDNs that pull from the npm registry.
While investigating, I found the change submitted in this PR, which is strongly encouraged in both the typescript docs and the skypack docs.
I think npm pulls from the built /dist folder whether or not this field is specified, but this change should help other CDNs find and support this repository's types. Thanks for your time!
Hi, I hope this is the right way to contribute here -- it seemed like a small enough suggestion that a preceding issue would have been too much.
I'm currently experimenting with a react project using deno, but I can't import the types for
react-use-websocket
. This isn't terribly surprising since deno has its own rules, and as a result (edit: of deno's rules) I have been importingreact-use-websocket
via either esm.sh or skypack which are deno-friendly CDNs that pull from the npm registry.While investigating, I found the change submitted in this PR, which is strongly encouraged in both the typescript docs and the skypack docs.
I think npm pulls from the built
/dist
folder whether or not this field is specified, but this change should help other CDNs find and support this repository's types. Thanks for your time!