refactor: replace the legacy function runtime with shared

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 23:13:05 +05:30
co-authored by Claude Opus 5
parent 224af8fd96
commit ec63090006
10 changed files with 72 additions and 33 deletions
+1 -3
View File
@@ -1310,9 +1310,7 @@ function hydrationAttribute(ast: PageAst): string {
function targetFunctions(ast: PageAst, target: "browser" | "server"): string {
const runtimes =
target === "browser"
? (["legacy", "client", "shared"] as const)
: (["legacy", "server", "shared"] as const);
target === "browser" ? (["client", "shared"] as const) : (["server", "shared"] as const);
return ast.functions
.map((body) => stripRuntimeFunctionModifiers(body, [...runtimes]))
.map((body) => body.trim())