From d4dbcf4dc5f74e23e41b3ed871e6fb439e8bab72 Mon Sep 17 00:00:00 2001 From: Paulo Margarido <64600052+paulomarg@users.noreply.github.com> Date: Mon, 6 May 2024 10:16:12 -0400 Subject: [PATCH 1/2] Fix server-side rendering for App Bridge v4 --- web/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/index.js b/web/index.js index 7817acc0..34099c3d 100644 --- a/web/index.js +++ b/web/index.js @@ -67,7 +67,11 @@ app.use("/*", shopify.ensureInstalledOnShop(), async (_req, res, _next) => { return res .status(200) .set("Content-Type", "text/html") - .send(readFileSync(join(STATIC_PATH, "index.html"))); + .send( + readFileSync(join(STATIC_PATH, "index.html")) + .toString() + .replace("%VITE_SHOPIFY_API_KEY%", process.env.SHOPIFY_API_KEY || "") + ); }); app.listen(PORT); From 4028bfeb93a60766dfbb49c5758892b3c25be1d4 Mon Sep 17 00:00:00 2001 From: Paulo Margarido <64600052+paulomarg@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:39:46 -0400 Subject: [PATCH 2/2] Update frontend reference --- web/frontend | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/frontend b/web/frontend index 800eb869..3160b2c3 160000 --- a/web/frontend +++ b/web/frontend @@ -1 +1 @@ -Subproject commit 800eb8691cb9585e6f14e8fb940d87ebe0f34e9d +Subproject commit 3160b2c314d3271ce579f6f848252406163793c9