3 ms·
Hey, thanks for sharing this on HN! I'm one of the Edge Functions developers at Supabase and co-author of the blog post. We are very excited about releasing npm
by laktek 3y ago
Hey, thanks for sharing this on HN! I'm one of the Edge Functions developers at Supabase and co-author of the blog post. We are very excited about releasing npm support and looking forward to seeing how the community build awesome apps with the Supabase stack.
I am happy to answer any questions or receive feedback.
- andrew_ 3y agohow deep does the support go? i.e. can we safely import from node platform builtins like `os` or are the same bundling gymnastics still required there? (fwiw this is one of the major issues with vercel's edge funcs)
- laktek 3y agoMost builtin modules should work (except for things like `vm` which we cannot safely sandbox in edge runtime). Deno has a good guide on the compatibility of built-in modules https://docs.deno.com/runtime/manual/node/compatibility https://docs.deno.com/runtime/manual/node/compatibility You can do: ``` import os from "node:os" console.log(os.hostname()) ``` and it should just work both locally and when deployed. No extra steps needed.