Skip to content

Commit

Permalink
fix(astro): Mark SDK package as Astro-external (#9509)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Lms24 committed Nov 9, 2023
1 parent 061fe5a commit ab39b26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@
},
"volta": {
"extends": "../../package.json"
},
"astro": {
"external": true
}
}

0 comments on commit ab39b26

Please sign in to comment.