grammyjs / grammY

The Telegram Bot Framework.
https://grammy.dev
MIT License
2.39k stars 118 forks source link

Be possible to run into a Web Runtime #113

Closed Kikobeats closed 2 years ago

Kikobeats commented 2 years ago

Hello,

I noted the library is using node-fetch as HTTP client: https://github.com/grammyjs/grammY/blob/main/package.json#L28

If the library uses an isomorphic like isomorphic-unfetch instead, it will enable running the library in more places, like Vercel Edge Functions.

KnorpelSenf commented 2 years ago

You are only looking at the backport for Node.js. The library is not written for Node.js. It does not require node-fetch (unless you are using the Node.js backport).

KnorpelSenf commented 2 years ago

FYI you can already get a version that runs in modern browsers at https://get.grammy.dev/es6@v1.4.2.js but please follow #111 because that is still experimental.

KnorpelSenf commented 2 years ago

116 is related, too