Files
lobehub__lobehub/vercel.json
Innei b65aae96b6 👷 build: migrate workspace to pnpm 12 (#19324)
* 👷 build: migrate workspace to pnpm 12

pnpm 12 no longer reads the package.json "pnpm" field, only honours auth and registry keys from .npmrc, and requires allowBuilds instead of onlyBuiltDependencies. Move every project setting into pnpm-workspace.yaml and keep the previously effective overrides and build allowlist.

* 👷 build: resolve desktop and cli workspaces on pnpm 12

pnpm 12 no longer accepts './'-prefixed workspace package globs, so the desktop stub path is now relative without the prefix. Migrate the remaining package.json "pnpm" fields into the desktop and cli pnpm-workspace.yaml files.

* 👷 build: list protobufjs in the desktop build allowlist

pnpm 12 fails the install with ERR_PNPM_IGNORED_BUILDS when a script-bearing dependency is missing from allowBuilds. protobufjs only appears in the desktop graph on Linux, so it was absent from the previous allowlist.

* 👷 build: relink root workspace members before the desktop typecheck

pnpm 12 writes broken relative symlinks for workspace members that live outside the desktop workspace root (../../packages/*), so tsgo cannot resolve sibling packages from source. Installing the root workspace after the desktop install rewrites those links correctly.
2026-09-09 19:43:11 +08:00

64 lines
1.5 KiB
JSON

{
"buildCommand": "bun run build:vercel",
"headers": [
{
"source": "/_spa/(.*)",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=86400, s-maxage=86400, stale-while-revalidate=604800, stale-if-error=86400, immutable"
},
{
"key": "CDN-Cache-Control",
"value": "public, max-age=86400, s-maxage=86400, stale-while-revalidate=604800, stale-if-error=86400, immutable"
}
]
},
{
"source": "/_dangerous_local_dev_proxy",
"headers": [
{
"key": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
}
]
},
{
"source": "/_dangerous_local_dev_proxy/:path*",
"headers": [
{
"key": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
},
{
"key": "Pragma",
"value": "no-cache"
},
{
"key": "Expires",
"value": "0"
}
]
}
],
"installCommand": "npx pnpm@12.3.4 install",
"rewrites": [
{
"source": "/_dangerous_local_dev_proxy",
"destination": "/_dangerous_local_dev_proxy.html"
},
{
"source": "/_dangerous_local_dev_proxy/:path*",
"destination": "/_dangerous_local_dev_proxy.html"
}
]
}