Skip to content

Commit b3d509d

Browse files
authored
fix(functions): set per_worker as default request policy for functions serve (#4040)
feat(cli): set per_worker as default request policy for functions serve Hot reload is now enabled by default when serving Edge Functions locally. Users experiencing issues with auto-reload (e.g. large repos, symlinked paths, or limited import resolution) can switch back to oneshot mode in config.toml.
1 parent d981b48 commit b3d509d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/config/templates/config.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,10 @@ enabled = false
303303

304304
[edge_runtime]
305305
enabled = true
306-
# Configure one of the supported request policies: `oneshot`, `per_worker`.
307-
# Use `oneshot` for hot reload, or `per_worker` for load testing.
308-
policy = "oneshot"
306+
# Supported request policies: `oneshot`, `per_worker`.
307+
# `per_worker` (default) — enables hot reload during local development.
308+
# `oneshot` — fallback mode if hot reload causes issues (e.g. in large repos or with symlinks).
309+
policy = "per_worker"
309310
# Port to attach the Chrome inspector for debugging edge functions.
310311
inspector_port = 8083
311312
# The Deno major version to use.

0 commit comments

Comments
 (0)