Skip to content

fix(minting-service): rename api/ to handlers/ so Vercel uses Build Output API#134

Merged
blove merged 1 commit into
mainfrom
fix/minting-service-rename-handlers-dir
Apr 21, 2026
Merged

fix(minting-service): rename api/ to handlers/ so Vercel uses Build Output API#134
blove merged 1 commit into
mainfrom
fix/minting-service-rename-handlers-dir

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 21, 2026

Summary

Follow-up to #133. The Nx build produces a correct Build Output API v3 layout, but Vercel's default Node builder still auto-detects api/*.ts at the project rootDirectory and runs @vercel/node on top of our output. That failed the first production deploy with api/health.ts: Emit skipped because @vercel/node's tsc doesn't resolve workspace tsconfig paths (@cacheplane/db, @cacheplane/licensing).

Fix

Rename apps/minting-service/api/apps/minting-service/handlers/ so Vercel's auto-detection finds nothing at the rootDirectory and falls back to the .vercel/output/ layout our buildCommand already produces.

The deployed URL path is unchanged — esbuild still emits to .vercel/output/functions/api/<name>.func/, which Vercel maps to /api/<name> by convention.

Test plan

  • npx nx build minting-service still produces valid output; require() loads default handler for both functions
  • npx nx test minting-service passes
  • Vercel production redeploy succeeds; curl https://<prod>/api/health{"ok":true}

🤖 Generated with Claude Code

The Nx esbuild build (PR #133) produced a correct Build Output API v3
layout under `.vercel/output/functions/api/*.func/`, but Vercel's
default Node builder still auto-detects `api/*.ts` at the project root
and runs `@vercel/node` on top of our output. That failed with
`api/health.ts: Emit skipped` because @vercel/node's tsc doesn't
resolve the workspace tsconfig paths.

Rename `apps/minting-service/api/` → `apps/minting-service/handlers/`
so Vercel's auto-detection finds nothing and falls back to the Build
Output API our buildCommand already produces. The deployed URL path
(`/api/health`, `/api/stripe-webhook`) is unchanged — esbuild still
emits to `.vercel/output/functions/api/<name>.func/`.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 21, 2026 7:44pm
cacheplane-minting-service Ready Ready Preview, Comment Apr 21, 2026 7:44pm

Request Review

@blove blove merged commit fd43113 into main Apr 21, 2026
15 checks passed
@blove blove deleted the fix/minting-service-rename-handlers-dir branch May 7, 2026 16:30
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.

1 participant