apps/site/package.json.
Overview
| Command | Output | Use case |
|---|---|---|
pnpm build | .next/ — Next.js server output | Production deployment on Vercel |
pnpm deploy | build/ — Static file export | Hosting without a Node.js server |
pnpm dev | Dev server on localhost:3000 | Local development |
pnpm build
The standard production build, used by Vercel on every deployment.- Runs
build:blog-datapre-build script to generate blog metadata - Runs
next buildviacross-env NODE_NO_WARNINGS=1 - Outputs to
.next/(the default Next.js build directory)
- URL rewrites and redirects (configured in
next.rewrites.mjs) - Incremental Static Regeneration (ISR)
- Next.js Image Optimization
- Server-side rendering for dynamic routes
pnpm deploy
The static export build. Used for hosting environments that do not have a Node.js server — specifically, the legacy Node.js website infrastructure on DigitalOcean.- Runs
build:blog-datapre-deploy script - Sets
NEXT_PUBLIC_STATIC_EXPORT=trueas an environment variable - Runs
next buildwith that flag active
NEXT_PUBLIC_STATIC_EXPORT=true is set, next.config.mjs applies these changes:
Static Export Locale Flag
An additional flag,NEXT_PUBLIC_STATIC_EXPORT_LOCALE=true, controls whether the static export generates pages for all locales or only for the default English locale:
pnpm dev
The local development server. Uses Next.js Turbopack for fast iteration.- Runs
build:blog-datapre-dev script to ensure blog metadata is current - Starts
next devwith Turbopack (turbopackFileSystemCacheForDev: true) - Serves the site on
http://localhost:3000
The
build:blog-data script runs before dev starts. If you add new blog posts during a dev session, restart the server or run pnpm build:blog-data manually.Cloudflare Build
In addition to the three primary targets, there is a Cloudflare-specific build:Blog Data Pre-build Step
All three primary build commands (build, deploy, dev) first run the build:blog-data script:
apps/site/scripts/blog-data/index.mjs reads all blog post files, generates metadata (titles, dates, categories, slugs, reading times), and writes a JSON data file that the build system consumes. Without this step, the blog listing and pagination will be empty or stale.