Skip to content

Conversation

@SuperchupuDev
Copy link

@SuperchupuDev SuperchupuDev commented Jun 23, 2024

raw-body was used in a way that it only converted the request to a Buffer. This PR replaces usage of raw-body with a less complex, native approach, removing not just the 11 dependencies that came with raw-body, but also undici's only subdependency (that was gone after updating undici). As such this PR lowers the amount of transitive dependencies in this package from 13 down to one (1).

I've tested that this approach and the way raw-body was used both give the same output, making this a free ~40% decrease in total bundle size

Code I ran to test

https://runkit.com/embed/4hcq12gepy26

image

@jpbberry jpbberry self-requested a review June 23, 2024 23:58
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

Successfully merging this pull request may close these issues.

1 participant