From e87da6457630e904dbd31c8c73fbd60601ce34d4 Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Mon, 27 May 2024 13:48:52 +0200 Subject: [PATCH] fix: don't shadow netlify functions --- demo.test.mjs | 1 + src/helpers/setUpEdgeFunction.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/demo.test.mjs b/demo.test.mjs index 8cc59427..3ab3c956 100644 --- a/demo.test.mjs +++ b/demo.test.mjs @@ -5,6 +5,7 @@ test('edge function config', async () => { const { config } = await import('./demo/.netlify/edge-functions/angular-ssr/angular-ssr.mjs') assert.deepEqual(config.excludedPath, [ + '/.netlify/*', '/dashboard/index.html', '/favicon.ico', '/heroes/index.html', diff --git a/src/helpers/setUpEdgeFunction.js b/src/helpers/setUpEdgeFunction.js index 9ef5f0b6..d035b32a 100644 --- a/src/helpers/setUpEdgeFunction.js +++ b/src/helpers/setUpEdgeFunction.js @@ -83,7 +83,7 @@ const setUpEdgeFunction = async ({ angularJson, constants, failBuild }) => { (path) => `/${relative(join(outputDir, 'browser'), path)}`, ) - const excludedPaths = [...staticFiles, ...(await getPrerenderedRoutes(outputDir))].map(toPosix) + const excludedPaths = ['/.netlify/*', ...staticFiles, ...(await getPrerenderedRoutes(outputDir))].map(toPosix) // buy putting this into a separate module that's imported first, // we ensure this is initialised before any other module