Deno & TypeScript support just got better

There’s never been a better time to try loading Deno modules from Skypack

We are big fans of Deno here at Skypack. In fact, It’s been over a year since we first launched Deno support in the Skypack CDN, with the ability to load and transform any existing npm package to run in Deno.

Today, we’re announcing two new features to dramatically expand and improve our support for Deno users!

Deno-Node.js compatibility

We’re excited to announce automatic support for Deno-Node.js Compatibility. How many times have you tried loading an existing package in Deno, and been blocked by some dependency on Node.js like Buffer or Stream?

Starting today, we’ll automatically swap that with its matching Deno “std” compatibility polyfill. If a popular npm package depends on a Node.js native built-in like stream, we now serve this from Skypack instead:

// Old code: 🚫 doesn’t work in Deno without a manual alias
import stream from 'stream';

// New code: ✅ uses Deno’s compatibility library instead
import stream from 'https://deno.land/std/node/stream.ts';  

To see what Deno/Node compatibilities are available, see the project at deno.land. We’ll continue to add support for more compatibility libraries as soon as they’re released! 🎉

More TypeScript types

Loading TypeScript types from Skypack is as easy as adding a ?dts to the end of any URL, e.g. https://cdn.skypack.dev/react?dts. In this recent release we’ve improved type resolution for hundreds of popular packages, including React and D3.

If it’s been a while since you’ve last used Skypack in Deno, give it a try! And as always, please feel free to open issues on the Skypack repo if you encounter any issues. Happy Deno-ing! 🦕