You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider removing Axios in favor native fetch. Personally I would recommend to use unjs/ofetch which works in all environments (node, browser, worker).
Motivation:
Bundle size: In serverless environments, and especially on edge workers, every kb counts and deepl-node is adding another unnecessary library by using Axios
deepl-node doesnt work on the edge: Axios is not working on non-node environments (without use of fetch adapter), this would resolve Remove Axios dependency #64
Using fetch, e.g. with ofetch as a wrapper, makes deepl-node work on all Node-like environments like Deno, Bun, Cloudflare Workers, etc.
Possibly with this refactoring a second package could be added that is independent from node, e.g. by removing things like fs. This package could then be used by deepl-node as a base.
Consider removing Axios in favor native
fetch. Personally I would recommend to use unjs/ofetch which works in all environments (node, browser, worker).Motivation:
deepl-nodeis adding another unnecessary library by using Axiosofetchas a wrapper, makes deepl-node work on all Node-like environments like Deno, Bun, Cloudflare Workers, etc.Possibly with this refactoring a second package could be added that is independent from node, e.g. by removing things like
fs. This package could then be used by deepl-node as a base.