How Deployments Work
Push to main
Every push to the
main branch triggers an automatic Vercel deployment. The site is built using pnpm build (which runs next build) and deployed globally.Branch previews
Pull requests automatically receive a preview deployment URL. This allows reviewers to see the live changes without merging.
Custom Install Script
Vercel uses a custom install command rather than the defaultnpm install:
--prod flag means only dependencies are installed — devDependencies are skipped entirely during the Vercel build.
Why This Matters
In standard Node.js projects,devDependencies are packages only needed for development (testing, linting, type checking). In this project, because Vercel skips devDependencies, anything used during next build — including MDX plugins, data processing tools, and content utilities — must be in dependencies.
Notable packages in dependencies for this reason:
@mdx-js/mdx— MDX compilation at build time@node-core/rehype-shiki— Syntax highlighting at build timegray-matter— Frontmatter parsing at build timeremark-gfm,rehype-slug,rehype-autolink-headings— Content processing at build timenext-intl— i18n at build time
Environment Variables
Vercel provides several system environment variables consumed by the site:| Variable | Source | Purpose |
|---|---|---|
VERCEL_ENV | Vercel system | Identifies Vercel environment (production, preview, development) |
VERCEL_URL | Vercel system | Full deployment URL (used to construct BASE_URL) |
NEXT_PUBLIC_BASE_URL | Manual override | Override the canonical base URL |
NEXT_GITHUB_API_KEY | Manual secret | GitHub API token to avoid rate limiting |
Build Configuration
The Vercel project is configured to:- Use pnpm as the package manager
- Run
pnpm buildas the build command (executes fromapps/site/) - Serve from the
apps/site/.next/directory - Enable the React Compiler (
reactCompiler: trueinnext.config.mjs)
Performance Features
The Next.js configuration enables several performance-oriented experimental features that benefit the Vercel build:Skew Protection
Vercel provides version skew protection out of the box. This ensures that users who loaded an older version of the site’s JavaScript still receive correct API responses even after a new deployment — preventing errors caused by mismatched client/server versions. For the Cloudflare deployment, skew protection requires additional manual configuration. See Cloudflare Deployment.Ownership
The Vercel project is owned and maintained by the OpenJS Foundation under thenodejs-vercel GitHub account. Sponsorship of the hosting is managed by the OpenJS Foundation.