Skip to content

fix: ignore Vercel OG traces for split functions - #1316

Closed
james-elicx wants to merge 1 commit into
mainfrom
codex/fix-vercel-og-split-functions
Closed

fix: ignore Vercel OG traces for split functions#1316
james-elicx wants to merge 1 commit into
mainfrom
codex/fix-vercel-og-split-functions

Conversation

@james-elicx

Copy link
Copy Markdown
Collaborator

Summary

  • skip Vercel OG traces whose route is not present in the default server function
  • keep OG usage detection and asset patching scoped to routes bundled into that function
  • add regression coverage for mixed and split-only OG routes

Root cause

patchVercelOgLibrary scanned NFT traces from the complete Next.js build, but parsed the corresponding route under server-functions/default. Named-function routes remain in the build traces while being intentionally absent from the default package, causing ENOENT during parsing.

Testing

  • pnpm --filter cloudflare exec vitest --run src/cli/build/patches/ast/patch-vercel-og-library.spec.ts
  • pnpm code:checks
  • pnpm test (34 test files, 343 tests)

Closes #1314

@changeset-bot

changeset-bot Bot commented Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dbe4339

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@opennextjs/cloudflare Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 23, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@1316

commit: dbe4339

@james-elicx

Copy link
Copy Markdown
Collaborator Author

Feels like is probably just masking a separate issue rather than a proper fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

functions route-splitting crashes in patchVercelOgLibrary (ENOENT) when a split-out route's trace includes @vercel/og

1 participant