Skip to content

Commit

Permalink
fix(vercel): Don't output an error message for failing to resolve sha…
Browse files Browse the repository at this point in the history
…rp (#8354)

* fix(vercel): Don't output an error message for failing to resolve sharp

* chore: changeset
  • Loading branch information
Princesseuh authored Sep 1, 2023
1 parent cc99b28 commit 0eb09db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-socks-return.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/vercel': patch
---

Fix unnecessary warning about Sharp showing while building
3 changes: 3 additions & 0 deletions packages/integrations/vercel/src/lib/nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export async function copyDependenciesToFunction(
// The import(astroRemark) sometimes fails to resolve, but it's not a problem
if (module === '@astrojs/') continue;

// Sharp is always external and won't be able to be resolved, but that's also not a problem
if (module === 'sharp') continue;

if (entryPath === file) {
console.warn(
`[@astrojs/vercel] The module "${module}" couldn't be resolved. This may not be a problem, but it's worth checking.`
Expand Down

0 comments on commit 0eb09db

Please sign in to comment.