Files
Reactive-Resume/knip.json
T
Amruth Pillai 725be158c0 feat(deploy): deploy Vercel as frontend and backend services
Vercel now deploys Reactive Resume as two services in one project:
`frontend` serves the static Vite build from apps/web/dist, and
`backend` runs the Hono server Function from apps/server. Top-level
rewrites send server-owned paths (/api, /uploads, /mcp, /.well-known,
robots.txt, sitemap.xml, llms.txt, schema.json, index.html) and every
path without a file extension to `backend`, so HTML shells keep their
injected SEO metadata. Paths with a file extension go to `frontend`.

The service builder needs a few accommodations:

- apps/server/vercel.mjs replaces api/index.mjs as the entrypoint,
  because a service entrypoint must exist before the build runs.
- `outputDirectory: "."` stops the builder from using the Docker
  entrypoint in dist/ as the Function handler.
- The builder loads external CommonJS dependencies through pnpm links
  that it leaves out of the Function. ioredis and react-reconciler are
  now bundled with their dependencies, and bcrypt is replaced with
  bcryptjs, which reads and writes the same $2b$ hashes.

The Vercel compatibility workflow now builds with the services
framework and loads a copy of the backend Function outside the
checkout, so a dependency missing from the Function fails CI. The stale
PDFKit trace checks are removed.

Existing Vercel installations must set Framework Preset to Services
before redeploying; the self-hosting guide documents this.
2026-09-30 00:17:24 +02:00

77 lines
1.6 KiB
JSON

{
"$schema": "https://unpkg.com/knip@6/schema.json",
"tags": ["-lintignore"],
"workspaces": {
"apps/web": {
"entry": ["lingui.config.ts", "vite.config.ts", "vitest.config.ts", "src/features/homepage/prerender.tsx"],
"vite": {
"config": []
},
"vitest": {
"config": []
}
},
"apps/server": {
"entry": ["vercel.mjs"],
"ignoreDependencies": [
"@ai-sdk/anthropic",
"@ai-sdk/cerebras",
"@ai-sdk/cohere",
"@ai-sdk/deepseek",
"@ai-sdk/fireworks",
"@ai-sdk/google",
"@ai-sdk/groq",
"@ai-sdk/mistral",
"@ai-sdk/openai",
"@ai-sdk/openai-compatible",
"@ai-sdk/perplexity",
"@ai-sdk/togetherai",
"@ai-sdk/xai",
"@aws-sdk/client-s3",
"@better-auth/api-key",
"@better-auth/drizzle-adapter",
"@better-auth/infra",
"@better-auth/passkey",
"@bramus/specificity",
"@formepdf/core",
"@formepdf/react",
"@orpc/experimental-ratelimit",
"@sindresorhus/slugify",
"@t3-oss/env-core",
"@uiw/color-convert",
"@vercel/blob",
"ai",
"bcryptjs",
"cjk-regex",
"css-tree",
"drizzle-zod",
"fast-json-patch",
"fast-png",
"fflate",
"ioredis",
"jose",
"jsonrepair",
"node-html-parser",
"nodemailer",
"ollama-ai-provider-v2",
"react-email",
"react-reconciler",
"resumable-stream",
"sanitize-html",
"sharp",
"tokenx",
"ts-pattern",
"unique-names-generator",
"uuid"
]
},
"tooling": {
"entry": ["issue-labels.mjs"]
},
"packages/api": {
"ignoreDependencies": ["ioredis"]
}
},
"ignoreDependencies": ["@reactive-resume/config"]
}