From 8526a6e988a1c222aa5b92472e8e59a97f54e379 Mon Sep 17 00:00:00 2001 From: Yujong Lee Date: Tue, 18 Nov 2025 19:29:35 +0900 Subject: [PATCH 1/2] add react in runtime in og edge function --- apps/web/netlify/edge-functions/deno.json | 3 +-- apps/web/netlify/edge-functions/og.tsx | 2 ++ dprint.json | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/netlify/edge-functions/deno.json b/apps/web/netlify/edge-functions/deno.json index a8e0f0ad09..075705c699 100644 --- a/apps/web/netlify/edge-functions/deno.json +++ b/apps/web/netlify/edge-functions/deno.json @@ -1,7 +1,6 @@ { "lock": false, "compilerOptions": { - "jsx": "react-jsx", - "jsxImportSource": "https://esm.sh/react@18.2.0" + "jsx": "react-jsx" } } diff --git a/apps/web/netlify/edge-functions/og.tsx b/apps/web/netlify/edge-functions/og.tsx index 45b90d0e6f..5a4786b54d 100644 --- a/apps/web/netlify/edge-functions/og.tsx +++ b/apps/web/netlify/edge-functions/og.tsx @@ -1,3 +1,5 @@ +// deno-lint-ignore no-unused-vars no-import-prefix +import React from "https://esm.sh/react@18.2.0"; // deno-lint-ignore no-import-prefix import { ImageResponse } from "https://deno.land/x/og_edge@0.0.6/mod.ts"; // deno-lint-ignore no-import-prefix diff --git a/dprint.json b/dprint.json index 15fb626295..7247636f94 100644 --- a/dprint.json +++ b/dprint.json @@ -30,7 +30,8 @@ "**/migrations/**", "**/tests/*.sql", "**/charts/**", - "**/schema.json" + "**/schema.json", + "**/netlify/edge-functions" ], "exec": { "cwd": "${configDir}", From 1f39b7d71f4c2c15d2d11a1d8360e9553b7dfbcc Mon Sep 17 00:00:00 2001 From: Yujong Lee Date: Tue, 18 Nov 2025 19:35:28 +0900 Subject: [PATCH 2/2] fix --- apps/web/netlify/edge-functions/deno.json | 3 ++- apps/web/netlify/edge-functions/og.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/netlify/edge-functions/deno.json b/apps/web/netlify/edge-functions/deno.json index 075705c699..a8e0f0ad09 100644 --- a/apps/web/netlify/edge-functions/deno.json +++ b/apps/web/netlify/edge-functions/deno.json @@ -1,6 +1,7 @@ { "lock": false, "compilerOptions": { - "jsx": "react-jsx" + "jsx": "react-jsx", + "jsxImportSource": "https://esm.sh/react@18.2.0" } } diff --git a/apps/web/netlify/edge-functions/og.tsx b/apps/web/netlify/edge-functions/og.tsx index 5a4786b54d..da42e64e1f 100644 --- a/apps/web/netlify/edge-functions/og.tsx +++ b/apps/web/netlify/edge-functions/og.tsx @@ -1,4 +1,4 @@ -// deno-lint-ignore no-unused-vars no-import-prefix +// deno-lint-ignore no-import-prefix no-unused-vars import React from "https://esm.sh/react@18.2.0"; // deno-lint-ignore no-import-prefix import { ImageResponse } from "https://deno.land/x/og_edge@0.0.6/mod.ts";