diff --git a/.changeset/shy-socks-return.md b/.changeset/shy-socks-return.md new file mode 100644 index 000000000000..ea046be2dcb5 --- /dev/null +++ b/.changeset/shy-socks-return.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Fix unnecessary warning about Sharp showing while building diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts index 6cdbe530a0ca..585a45e998dc 100644 --- a/packages/integrations/vercel/src/lib/nft.ts +++ b/packages/integrations/vercel/src/lib/nft.ts @@ -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.`