From 3cca5c8aaba34d06510754b27ac1c36d1e39e9c6 Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 8 Oct 2024 16:42:44 +0200 Subject: [PATCH] Fix runtime error when installing with pnpm (#201) * use `raw` import for `inspectionChamber` endpoint * chore: add changeset * Update integration/astro-inspection-chamber.js.ts --------- Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> --- .changeset/six-spiders-design.md | 5 +++++ integration/astro-inspection-chamber.js.ts | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/six-spiders-design.md diff --git a/.changeset/six-spiders-design.md b/.changeset/six-spiders-design.md new file mode 100644 index 0000000..546959b --- /dev/null +++ b/.changeset/six-spiders-design.md @@ -0,0 +1,5 @@ +--- +'astro-vtbot': patch +--- + +fixes `inspectionChamber` endpoint runtime error when using `pnpm` diff --git a/integration/astro-inspection-chamber.js.ts b/integration/astro-inspection-chamber.js.ts index cbec87b..1faec58 100644 --- a/integration/astro-inspection-chamber.js.ts +++ b/integration/astro-inspection-chamber.js.ts @@ -1,6 +1,5 @@ -import { readFileSync } from 'node:fs'; - -const inspectionChamber = readFileSync('node_modules/@vtbag/inspection-chamber/lib/index.js'); +import "astro/client"; +import inspectionChamber from "@vtbag/inspection-chamber?raw"; export async function GET({ params, request }) { return new Response(