© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
5 replies
Will

How to share code between edge functions and nextjs app?

Let's say I have supabase js queries I use in my nextjs app, but also in my edge functions. I want to share the code between the two, but the issue is that the deno edge functions import supabasjs with the deno import, while the nextjs app does it with a directly installed npm package. When I try to build the nextjs app when using code inside of my supabase/functions folder, the build fails. Any way to make this work?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Difference between edge functions and webhooks
SupabaseSSupabase / help-and-questions
4y ago
Is it possible to create global functions for reusable code between Edge Functions?
SupabaseSSupabase / help-and-questions
3y ago
How to install Edge Functions?
SupabaseSSupabase / help-and-questions
13mo ago
Debugging Edge Functions — How?
SupabaseSSupabase / help-and-questions
4y ago