Workers - Control which routes invoke your Worker script for Single Page Applications
For those building Single Page Applications (SPAs) on Workers, you can now explicitly define which routes invoke your Worker script in Wrangler configuration. The run_worker_first config option has now been expanded to accept an array of route patterns, allowing you to more granularly specify when your Worker script runs. Configuration example: wrangler.jsonc { "name": "my-spa-worker", // Set this to today's date "compatibility_date": "2026-05-21", "main": "./src/index.ts",
