khrome / ascii-art

A Node.js library for ansi codes, figlet fonts, ascii art and other ASCII graphics
MIT License
681 stars 287 forks source link

Replace request lib #19

Closed cktang88 closed 4 years ago

cktang88 commented 4 years ago

Request is very bloated - https://bundlephobia.com/result?p=request@2.88.0

Can possibly replace with https://bundlephobia.com/result?p=node-fetch@2.6.0 or https://bundlephobia.com/result?p=axios@0.19.0 or something similar?

khrome commented 4 years ago

in the browser under UMD browser-request is used.

That bundle size should please you: https://bundlephobia.com/result?p=browser-request@0.3.3

In node, I would question the wisdom of individual package analysis like this(under fetch no logic can be shared, whereas request uses dependencies... which is a good thing). So exclude request from your bundle configuration and make sure browser-request is used, and you're golden.