Edge function shared code

Fairly new to edge functions, modularizing some parts and learning about shared code in edge functions. I believe the documentation states that having a _shared folder inside the functions folder and outside any specific function with relative imports
import { x } from "../_shared/x.ts";
(https://supabase.com/docs/guides/functions/development-tips#organizing-your-edge-functions)
is the way to utilize shared code. The error in the image
Caused by:
    Module not found "file:///Projects/Programming/work/v2/supabase/functions/_shared/header".
        at file:///Projects/Programming/work/v2/supabase/functions/testing/index.ts:1:24
error running container: exit 1
Try rerunning the command with --debug to troubleshoot the error.

is the result of that syntax. I also read that I need to make an import map in the config.toml to make the function aware of the shared code, I tried this with
[functions]
import_map = "./functions/import_map.json"

to try to make a global import map where I specified
{
  "imports": {
    "shared/": "./_shared/",
    "@supabase/supabase-js": "https://esm.sh/@supabase/supabase-js@2"
  }
}

to allow all functions to access the shared code. This did not work either...

How can I access my shared code? Thanks!
image.png
Tips for getting started with Edge Functions.
Was this page helpful?