From 0f7eab637feb57be9fc3309a61479fba39b435e3 Mon Sep 17 00:00:00 2001 From: John Fawcett Date: Tue, 23 Aug 2022 12:18:51 -0500 Subject: [PATCH] chore(templates): Update CF Pages template to include new routes spec _routes.json is a new optional file from Cloudflare Pages. It describes how [Pages Functions](https://developers.cloudflare.com/pages/platform/functions/) are routed through the Cloudflare Workers runtime. Via inclusion and exclusion rules, we route traffic to your Pages Functions or to static assets. --- contributors.yml | 1 + templates/cloudflare-pages/package.json | 2 +- templates/cloudflare-pages/public/_routes.json | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 templates/cloudflare-pages/public/_routes.json diff --git a/contributors.yml b/contributors.yml index e865ccea287..1317a7b0052 100644 --- a/contributors.yml +++ b/contributors.yml @@ -194,6 +194,7 @@ - johnson444 - joms - joshball +- jrf0110 - jrubins - jssisodiya - jstafman diff --git a/templates/cloudflare-pages/package.json b/templates/cloudflare-pages/package.json index 54d0e7106bd..8ae9cb492fb 100644 --- a/templates/cloudflare-pages/package.json +++ b/templates/cloudflare-pages/package.json @@ -25,7 +25,7 @@ "eslint": "^8.20.0", "npm-run-all": "^4.1.5", "typescript": "^4.7.4", - "wrangler": "^2.0.22" + "wrangler": "^2.0.27" }, "engines": { "node": ">=14" diff --git a/templates/cloudflare-pages/public/_routes.json b/templates/cloudflare-pages/public/_routes.json new file mode 100644 index 00000000000..e4f167ed920 --- /dev/null +++ b/templates/cloudflare-pages/public/_routes.json @@ -0,0 +1,5 @@ +{ + "version": 1, + "include": ["/*"], + "exclude": ["/build/*"] +} \ No newline at end of file