Skip to content

feat: add hCaptcha to Vercel configuration#37

Merged
GTPSHAX merged 2 commits into
NgodingCik:mainfrom
GTPSHAX:main
May 6, 2026
Merged

feat: add hCaptcha to Vercel configuration#37
GTPSHAX merged 2 commits into
NgodingCik:mainfrom
GTPSHAX:main

Conversation

@GTPSHAX
Copy link
Copy Markdown
Contributor

@GTPSHAX GTPSHAX commented May 6, 2026

Summary

This PR updates the Vercel configuration files to ensure the hcaptcha dependency is correctly bundled within the serverless deployment environments. This prevents runtime "module not found" errors after the recent integration of hCaptcha validation.

Key Changes

  • Dependency Bundling: Updated the includeFiles property in both the root vercel.json and apps/web/vercel.json.
  • Package Persistence: Explicitly added node_modules/hcaptcha/** (or the relative path to the package) to the Vercel deployment configuration to ensure it is available to the serverless functions at runtime.

Why this is necessary

Vercel's serverless environment sometimes tree-shakes or excludes dependencies that are not explicitly detected during the build phase, especially in monorepo structures.

  1. Runtime Reliability: Ensures that the hcaptcha validation logic implemented in previous PRs does not crash the production server.
  2. Deployment Consistency: Standardizes how the API and Web apps handle external security dependencies within the Vercel infrastructure.

How to Test

  1. Vercel Preview: Deploy this branch to a Vercel preview environment.
  2. Execution Check: Trigger a document generation request that requires hCaptcha validation.
  3. Log Verification: Monitor the Vercel Function logs; if the package is missing, it will throw a Cannot find module 'hcaptcha' error. Confirm that the validation logic now executes successfully.

@GTPSHAX GTPSHAX self-assigned this May 6, 2026
@GTPSHAX GTPSHAX merged commit 3daa407 into NgodingCik:main May 6, 2026
1 check passed
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