Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions apps/server/scripts/build-vercel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ set -euo pipefail

echo "[build-vercel] Starting server build..."

# 1. Build the project with pnpm (from monorepo root)
# This builds both server and console
# 1. Build workspace dependencies and console
cd ../..
echo "[build-vercel] Building console with server mode..."
echo "[build-vercel] Building workspace dependencies (excluding site and non-essential packages)..."
# Build only packages needed for console, skip create-plugin and site
pnpm --filter '@object-ui/*' --filter '!@object-ui/create-plugin' --filter '!@object-ui/console' --filter '!@object-ui/server' --filter '!@object-ui/site' run build || true
Comment on lines +22 to +23
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command masks all failures with || true, which can let the build proceed even when required workspace packages fail to build—leading to harder-to-debug runtime/deploy errors. If the intent is only to skip packages that don’t have a build script, use pnpm’s --if-present (and keep non-zero exit codes for real build failures).

Suggested change
# Build only packages needed for console, skip create-plugin and site
pnpm --filter '@object-ui/*' --filter '!@object-ui/create-plugin' --filter '!@object-ui/console' --filter '!@object-ui/server' --filter '!@object-ui/site' run build || true
# Build only packages needed for console, skip create-plugin and site.
# Use --if-present so packages without a build script are skipped, while real build failures still stop the deployment.
pnpm --filter '@object-ui/*' --filter '!@object-ui/create-plugin' --filter '!@object-ui/console' --filter '!@object-ui/server' --filter '!@object-ui/site' --if-present run build

Copilot uses AI. Check for mistakes.
echo "[build-vercel] Building console..."
pnpm --filter @object-ui/console run build
cd apps/server

Expand Down
2 changes: 1 addition & 1 deletion apps/server/vercel.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"framework": null,
"installCommand": "cd ../.. && pnpm install --frozen-lockfile",
"installCommand": "cd ../.. && pnpm install --frozen-lockfile --ignore-scripts",
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

installCommand was changed to use --ignore-scripts, but the server build relies on esbuild (apps/server/scripts/bundle-api.mjs imports it). Disabling lifecycle scripts prevents esbuild (and other deps with install scripts) from installing their platform binaries, which will break the Vercel build. If the goal is to skip apps/site/docs install work, prefer using pnpm install --filter @object-ui/server... (as described in the PR) rather than disabling scripts globally, or otherwise ensure required install scripts still run.

Suggested change
"installCommand": "cd ../.. && pnpm install --frozen-lockfile --ignore-scripts",
"installCommand": "cd ../.. && pnpm install --frozen-lockfile --filter @object-ui/server...",

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says the deployment optimization is adding --filter @object-ui/server... to limit workspace installation, but the actual change switches to --ignore-scripts and still installs from the monorepo root without any filter. Either update the implementation to match the described --filter approach, or update the PR description so it reflects the actual behavior and tradeoffs.

Copilot uses AI. Check for mistakes.
"buildCommand": "bash scripts/build-vercel.sh",
"build": {
"env": {
Expand Down
4 changes: 3 additions & 1 deletion packages/i18n/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"rootDir": "src",
"noEmit": false,
"declaration": true,
"composite": true
"composite": true,
"jsx": "react-jsx",
"lib": ["ES2020", "DOM"]
},
"include": ["src"],
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx"]
Expand Down
Loading