Netlify Edge function clashing with nextjs dynamic route


I’m trying to use Netlify Edge Functions for my website.
I’m also using NextJS.

The problem I’m facing is that I have a Dynamic Route like this:


and my netlify’s toml file has something like this:

  path = "/myfunction"
  function = "myfunction"

the problem is, since I’m using a dynamic route for my website, there’s no way for me to access the netlify function on it’s path because it tries to run the dynamic function instead.

So, if I visit: https://mywebsite/myfunction
my website tries to run:

instead of

Does anyone have any idea on how to exclude my edge function from being served by nextjs’ dynamic routes?


Hey @raulvidzing,

I’ve responded to your question in the helpdesk. Let us know where you’d like to continue the discussion.