suhaotian / xior

A lite request lib based on fetch with plugin support and similar API to axios.
https://suhaotian.github.io/xior/
MIT License
193 stars 4 forks source link

Does not work on Vercel edge runtime #3

Closed peterarusanoff closed 8 months ago

peterarusanoff commented 8 months ago

When i try to push I simply get

    Error: The Edge Function "my/file/path" is referencing unsupported modules:
    - path/to/my/file.ts: xior
suhaotian commented 8 months ago

@peterarusanoff

Thanks report this issue!

I add edge function in the ./next-example and publish to vercel , t's worked:

Links:

https://xior-next-example.vercel.app/api/hello-edge (edge runtime) https://xior-next-example.vercel.app/api/hello-node (nodejs runtime)

Example code here:

https://github.com/suhaotian/xior/tree/main/next-example/app/api/hello-edge/route.ts https://github.com/suhaotian/xior/tree/main/next-example/app/api/hello-node/route.ts

Maybe I missing something for the case, It would be nice, if you paste your reproduce repo or example code here.

suhaotian commented 8 months ago

I will close this, if still have problem, please feel free to reopen, and thanks for your feedback