From ab39b266b11a4215fa0427fb8e42ecb1403a7a06 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 9 Nov 2023 15:53:57 +0100 Subject: [PATCH] fix(astro): Mark SDK package as Astro-external (#9509) Astro's Vite plugin tries to detect if a package is an "astro component package" (i.e. contains `.astro`) files by checking for a bunch of heuristics in the project's `package.json`. These packages will be run through the Astro compiler. https://github.com/withastro/astro/blob/7c458514c06c95158245bba4fa3c254abd333f5a/packages/astro/src/core/create-vite.ts#L74-L89 Because our SDK package matches multiple of the used heuristics, it is added to the compiler build which causes errors because some of our packages make the build fail (not sure why/how). Apparently, this is only problematic when the project is managed by `pnpm` which results in a build error. Other package managers don't seem to have a problem. --- packages/astro/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/astro/package.json b/packages/astro/package.json index d440be51bb9e..531b99bc372e 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -74,5 +74,8 @@ }, "volta": { "extends": "../../package.json" + }, + "astro": { + "external": true } }