From 57a5eff5cee9852dca1e328e233949581edc5fb9 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 14 Jul 2023 16:01:06 -0500 Subject: [PATCH] fix(#7654): exclude @vercel/nft (#7659) --- .changeset/pretty-hats-smash.md | 5 +++++ packages/integrations/vercel/src/edge/adapter.ts | 3 +++ packages/integrations/vercel/src/serverless/adapter.ts | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 .changeset/pretty-hats-smash.md diff --git a/.changeset/pretty-hats-smash.md b/.changeset/pretty-hats-smash.md new file mode 100644 index 000000000..e67993758 --- /dev/null +++ b/.changeset/pretty-hats-smash.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Fix critical build regression. `@vercel/nft` is excluded from the bundle automatically. diff --git a/packages/integrations/vercel/src/edge/adapter.ts b/packages/integrations/vercel/src/edge/adapter.ts index 3c2d39116..c9febbffe 100644 --- a/packages/integrations/vercel/src/edge/adapter.ts +++ b/packages/integrations/vercel/src/edge/adapter.ts @@ -66,6 +66,9 @@ export default function vercelEdge({ }, vite: { define: viteDefine, + ssr: { + external: ['@vercel/nft'] + } }, ...getImageConfig(imageService, imagesConfig, command), }); diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 79e0a91ae..d0c65d9e2 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -94,6 +94,9 @@ export default function vercelServerless({ }, vite: { define: viteDefine, + ssr: { + external: ['@vercel/nft'] + } }, ...getImageConfig(imageService, imagesConfig, command), });