DEV Community

Discussion on: How to use @yarnpkg/core?

 
jenbutondevto profile image
Jen • Edited

Do you need to install it, or just serve it? skypack will work for node also. I haven't tried, but I imagine you can do something like

const pkgUrl = 'https://cdn.skypack.dev/date-fns'
const servePkg = async () => { 
   const { default: pkg } = await import(pkgUrl);
   // pkg.method(...)
 })
Enter fullscreen mode Exit fullscreen mode