deepl-node
deepl-node copied to clipboard
Remove Axios dependency
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-nodeis 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 #64
- Using fetch, e.g. with
ofetchas 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.