Skip to content

chore: add pnpm install and build commands to vercel.json#4375

Open
faizkhairi wants to merge 3 commits into
nusmodifications:masterfrom
faizkhairi:fix/vercel-pnpm-config
Open

chore: add pnpm install and build commands to vercel.json#4375
faizkhairi wants to merge 3 commits into
nusmodifications:masterfrom
faizkhairi:fix/vercel-pnpm-config

Conversation

@faizkhairi
Copy link
Copy Markdown

@faizkhairi faizkhairi commented Mar 24, 2026

Summary

  • Add installCommand and buildCommand to the existing website/vercel.json to configure pnpm as the package manager for Vercel builds, replacing the CRA defaults
  • Existing functions, headers, rewrites, redirects, and ignoreCommand are preserved unchanged

Related Issue

Closes #4370

Test Plan

  • Verify Vercel preview build uses pnpm for install and build
  • Verify existing API proxy, redirects, and cache headers still work
  • Confirm no regression in production deployment

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 24, 2026

@faizkhairi is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.39%. Comparing base (988c6fd) to head (e9bc8ef).
⚠️ Report is 227 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4375      +/-   ##
==========================================
+ Coverage   54.52%   56.39%   +1.86%     
==========================================
  Files         274      317      +43     
  Lines        6076     6962     +886     
  Branches     1455     1679     +224     
==========================================
+ Hits         3313     3926     +613     
- Misses       2763     3036     +273     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@faizkhairi faizkhairi force-pushed the fix/vercel-pnpm-config branch from 74333de to e903ab9 Compare March 24, 2026 17:08
Add installCommand and buildCommand to the existing vercel.json
to configure pnpm as the package manager for Vercel builds,
replacing the CRA defaults.

Existing functions, headers, rewrites, redirects, and ignoreCommand
are preserved unchanged.
@faizkhairi faizkhairi force-pushed the fix/vercel-pnpm-config branch from e903ab9 to 0a70772 Compare March 24, 2026 17:13
@faizkhairi faizkhairi changed the title chore: configure pnpm as Vercel build command in website/vercel.json chore: add pnpm install and build commands to vercel.json Mar 24, 2026
faizkhairi and others added 2 commits March 25, 2026 01:23
Vercel's auto-detection uses --frozen-lockfile by default.
Explicit installCommand without it would regress that behavior.
@jloh02
Copy link
Copy Markdown
Member

jloh02 commented May 18, 2026

@greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 18, 2026

Confidence Score: 5/5

Safe to merge — the change is a two-line addition to a JSON config file with no effect on application logic.

Both commands are straightforward: --frozen-lockfile correctly locks the install step for production, and pnpm build maps directly to the verified build script in website/package.json. The repo uses a pnpm workspace with pnpm-workspace.yaml at the root, so pnpm will traverse up correctly even when Vercel's working directory is set to website/. No existing config entries are altered.

No files require special attention.

Important Files Changed

Filename Overview
website/vercel.json Adds installCommand and buildCommand to wire pnpm as the package manager for Vercel builds; all existing configuration is preserved.

Sequence Diagram

sequenceDiagram
    participant V as Vercel CI
    participant R as Repo Root
    participant W as website/

    V->>R: git clone (full repo)
    V->>W: cd website/ (root dir)
    V->>R: pnpm install --frozen-lockfile
    R-->>V: all workspace deps installed
    V->>W: pnpm build
    W-->>V: "pnpm prepare:optimiser && node scripts/build"
    V->>V: deploy static output + serverless functions
Loading

Reviews (1): Last reviewed commit: "Merge branch 'master' into fix/vercel-pn..." | Re-trigger Greptile

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.

Configure vercel build to use pnpm

2 participants