nextlove icon indicating copy to clipboard operation
nextlove copied to clipboard

add support for edge

Open itelo opened this issue 2 years ago • 1 comments

This PR contains a LOT of stuff, and will probably be split into some PRs

  1. edge only supports web native API, so some things we do in the generated scripts are not allowed, and we should either move them to a new package (nextlove-generate) or improve the build to not bundle everything in one file.
  2. move the nextjs-wrappers-middleware and nextjs-exception-middleware to nextlove
  3. nsm needs to support the new folder structure (/app), unable to test until it.
  4. we need to check the issue with nextjs redirects (in nextjs config file)

After that, we are good to go.

The final result is:

image image

Note that: responseEdge, edgeBody, and edgeQuery are variable names just to make it work, I'll appreciate it with you have better names.

itelo avatar Jul 13 '23 19:07 itelo

nsm needs to support the new folder structure (/app), unable to test until it.

I think we can opt-in specific routes without using /app: https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#segment-runtime-option

codetheweb avatar Jul 13 '23 20:07 codetheweb