From 6b57628d128779290db3344bbb6de7282196fb97 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 11 Aug 2023 09:58:32 -0400 Subject: [PATCH] Prevent Vercel NFT from scanning /dev (#8039) * Prevent Vercel NFT from scanning /dev * Add a comment --- .changeset/fast-penguins-sleep.md | 5 +++++ packages/integrations/vercel/src/lib/nft.ts | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/fast-penguins-sleep.md diff --git a/.changeset/fast-penguins-sleep.md b/.changeset/fast-penguins-sleep.md new file mode 100644 index 000000000000..bd31711641a6 --- /dev/null +++ b/.changeset/fast-penguins-sleep.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Prevent Vercel NFT from scanning /dev diff --git a/packages/integrations/vercel/src/lib/nft.ts b/packages/integrations/vercel/src/lib/nft.ts index 752f87251bc7..adba8d985c85 100644 --- a/packages/integrations/vercel/src/lib/nft.ts +++ b/packages/integrations/vercel/src/lib/nft.ts @@ -28,6 +28,9 @@ export async function copyDependenciesToFunction({ const { nodeFileTrace } = await import('@vercel/nft'); const result = await nodeFileTrace([entryPath], { base: fileURLToPath(base), + // If you have a route of /dev this appears in source and NFT will try to + // scan your local /dev :8 + ignore: ['/dev/**'] }); for (const error of result.warnings) {