I have been playing with deno again lately, seems like it's come quite far now. But what I am wondering about is using libraries.
I would love to use xstate but I'm not sure if xstate needs to be packaged in some special way for deno. How would I import it into my code?
Top comments (3)
Packages would need to be valid ES6 modules. I guess you'll have to rely on cdn like unpkg or pika.dev.
Using pika.dev cdn and xstate as an example, I think you'll have to do this.
The deno manual has a section on using third party code: link
Thanks that's a great help, what about type defs? (Will read link)
If you use pika.dev you don't have to do anything to get the type definitions. According to this article.
The manual also has a external type definition section: link