From 8b51448da8f5772603aa0b2da9db796f86e970d2 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 19 Jan 2023 19:47:36 -0500 Subject: [PATCH] fix cloudflare routes (#8618) --- packages/adapter-cloudflare/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/adapter-cloudflare/index.js b/packages/adapter-cloudflare/index.js index 22b39cc5a16a..2e79a8cb8048 100644 --- a/packages/adapter-cloudflare/index.js +++ b/packages/adapter-cloudflare/index.js @@ -73,7 +73,9 @@ function get_routes_json(builder, assets) { */ const exclude = [ `/${builder.config.kit.appDir}/*`, - ...assets.filter((file) => !file.startsWith(`${builder.config.kit.appDir}/`)) + ...assets + .filter((file) => !file.startsWith(`${builder.config.kit.appDir}/`)) + .map((file) => `/${file}`) ]; const MAX_EXCLUSIONS = 99; // 100 minus existing `include` rules