Skip to content

Commit 977800f

Browse files
lakteksweatybridge
authored andcommitted
fix: update edge-runtime to support import maps
1 parent eae807c commit 977800f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

internal/functions/serve/serve.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,17 @@ func runServeAll(ctx context.Context, envFilePath string, noVerifyJWT *bool, imp
285285
filepath.Join(cwd, utils.FunctionsDir) + ":" + relayFuncDir + ":rw,z",
286286
utils.DenoRelayId + ":/root/.cache/deno:rw,z",
287287
}
288-
// If a import map path is explcitly provided, mount it as a separate file
288+
dockerImportMapPath := relayFuncDir + "/import_map.json"
289289
if importMapPath != "" {
290-
binds = append(binds, filepath.Join(cwd, importMapPath)+":"+customDockerImportMapPath+":ro,z")
290+
binds = append(binds, filepath.Join(cwd, importMapPath)+":"+dockerImportMapPath+":ro,z")
291291
}
292292

293293
fmt.Println("Serving " + utils.Bold(utils.FunctionsDir))
294294

295295
cmd := []string{"start", "--dir", relayFuncDir, "-p", "8081"}
296+
if importMapPath != "" {
297+
cmd = append(cmd, "--import-map", dockerImportMapPath)
298+
}
296299
if viper.GetBool("DEBUG") {
297300
cmd = append(cmd, "--verbose")
298301
}

internal/utils/misc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const (
4040
StudioImage = "supabase/studio:20230216-e731b77"
4141
DenoRelayImage = "supabase/deno-relay:v1.5.0"
4242
ImageProxyImage = "darthsim/imgproxy:v3.8.0"
43-
EdgeRuntimeImage = "supabase/edge-runtime:v1.0.15"
43+
EdgeRuntimeImage = "supabase/edge-runtime:v1.0.20"
4444
// Update initial schemas in internal/utils/templates/initial_schemas when
4545
// updating any one of these.
4646
GotrueImage = "supabase/gotrue:v2.40.1"

0 commit comments

Comments
 (0)