Skip to content

Commit

Permalink
code suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jul 5, 2023
1 parent 1c0a2ca commit e001471
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/integrations/vercel/src/lib/nft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export async function copyDependenciesToFunction({
base = new URL('../', base);
}

// The Vite bundle includes an import to `@vercel/nft` for some reason,
// and that trips up `@vercel/nft` itself during the adapter build. Using a
// dynamic import helps prevent the issue.
// TODO: investigate why
const { nodeFileTrace } = await import('@vercel/nft');
const result = await nodeFileTrace([entryPath], {
base: fileURLToPath(base),
Expand Down

0 comments on commit e001471

Please sign in to comment.