From 3cb593573df7ad9c845420dab37e68fc9b77016e Mon Sep 17 00:00:00 2001 From: mfrachet Date: Sun, 12 Feb 2023 08:53:03 +0100 Subject: [PATCH] Trailing functions slash --- packages/integrations/cloudflare/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts index 270067d75957..0343e6e81874 100644 --- a/packages/integrations/cloudflare/src/index.ts +++ b/packages/integrations/cloudflare/src/index.ts @@ -203,10 +203,10 @@ export default function createIntegration(args?: Options): AstroIntegration { } if (isModeDirectory) { - const functionsUrl = new URL('functions', _config.root); + const functionsUrl = new URL('functions/', _config.root); await fs.promises.mkdir(functionsUrl, { recursive: true }); - const directoryUrl = new URL('functions/[[path]].js', _config.root); + const directoryUrl = new URL('[[path]].js', functionsUrl); await fs.promises.rename(finalBuildUrl, directoryUrl); } },