How to import library in Edge Function ?
Hey Good afternoon !
I would like to export my function in an edge function to execute it in the back.
I'm using supabase and I installed deno to do that.
I would like to import my libraries like my initial function but deno it's different...
I need both of these libraries to my function but I don't how I'm suppose to import them.
I read on forum, I need to use CDN for that but I don't know how it works :/
If someone could help me it will be wonderful ^^
Btw sorry for my english 😉
2 Replies
Just import them like you would normally. With Deno 2 npm support pretty good which means you don't need to go to alternative registries like
esm.sh
.Hey @marvinh. , thanks for you answer 😉
I did what you said but when I tried to deploy the function, all is good, buit when I tried to use it I have this error :
I used this import to the test :
(I checked I jave deno 2.0.0 )
okay it works with 'npm:google-auth-library'