npx wrangler pages functions build ./functions

Category: Cloudflare

npx wrangler pages functions build ./functions

Compile Pages Functions into a single Worker

Bundles the ./functions directory into one Worker file for inspection or deployment elsewhere, mirroring what Pages does automatically at deploy time. Pages Functions let you add serverless endpoints to a static site using file-based routing. Mainly a debugging and CI tool.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.