Next.config rewrites

Is it possible to use the next.config rewrites config with the @cloudflare/next-on-pages library? When I npx @cloudflare/next-on-pages and then npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat I get this error in console:
2 Replies
NastykSwED
NastykSwED15mo ago
James
James15mo ago
I must admit, my first reaction was excitement because this is the first time that check I added has come in useful. Anyway, do you mind if I ask why you are using a rewrite like that one? By design, that rewrite would match any path, which is why I'm curious to know more about why one like that is needed The thing is, that rewrite is designed to rewrite /* to /api/avatar/*. When it doesn't find a file that matches at /api/avatar/*, it hits the rewrite again, according to the rules in the build output config that we respect
Want results from more Discord servers?
Add your server