Functions directory not working with nextjs app.
Hi,
I have set up and deployed a nextjs app following https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/
However, none of my functions from /functions are appearing in the build. Not sure why. When building locally using
next-on-pages
it generates a _workers.js/index.js files which I believe is what is supposed to happen. However none of my functions or middleware are existent in the build or deployment.3 Replies
You should use Next.js API routes/middleware instead of the functions directory for Next.js apps when using next-on-pages, since we generate our own worker for your app instead.
Thanks, https://developers.cloudflare.com/pages/platform/functions/plugins/mailchannels/
I’m looking to implement this, would I just have to call it directly from next middleware and pass in the form data myself?
MailChannels · Cloudflare Pages docs
The MailChannels Pages Plugin intercepts all form submissions made which have the data-static-form-name attribute set. Then, it emails these form …
I would assume so, I've never looked at that library before