Replies: 1 comment 2 replies
-
What are the downsides to not using per function import maps / deno.json files? I am currently deliberately not doing this because I share a lot of code across my functions and want to ensure that each function is using the same version of the common dependencies and using a single import map ensures consistency in a way that multiple files cannot. My edge functions are conceptually part of one application and should have a common set of dependency versions and the recommended approach (per function As well as having a single import map, further up (not deployed), I have a single |
Beta Was this translation helpful? Give feedback.
-
Each Edge Function can now have its own
deno.json
ordeno.jsonc
file to manage dependencies. You will need to deploy your functions using Supabase CLI version v1.215.0 or above to make use of this feature.How to use
deno.json
Create a
deno.json
in your function's folder:You can now use aliased imports in your source code:
To test your function locally, run
supabase functions serve
. When you're ready, you can deploy it to hosted platform by runningsupabase functions deploy function-name
For more details, check the guide: https://supabase.com/docs/guides/functions/import-maps#using-denojson-recommended
Beta Was this translation helpful? Give feedback.
All reactions