Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace request lib #19

Closed
cktang88 opened this issue Nov 29, 2019 · 1 comment
Closed

Replace request lib #19

cktang88 opened this issue Nov 29, 2019 · 1 comment

Comments

@cktang88
Copy link

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
Copy link
Owner

khrome commented Nov 30, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants