Hi everyone ! Is there anyway I can avoid the use ...
# general
i
Hi everyone ! Is there anyway I can avoid the use of axios with @ory/client or should I create a custom integration if I want to do that?
b
b
That’s good to know!
i
That's amaziiing ! Axios is sooo big
@bland-eye-99092 how can the SDK using fetch can be bigged than the SDK using axios ? How it that possible ?
b
Axios is an external dependency, so it wouldn't count towards the dependency's size. And the fetch SDK generates two versions of each endpoint: one with typesafe return types, and one containing the raw response bodies, headers, etc. This is helpful for debugging and development.
i
b
Interesting. I don't think this is an issue, though. The @ory/client-fetch package is very tree-shakable. So you wouldn't be shipping the whole 400kb to any browser clients, if you set up tree-shaking in your project, right?
i
Yep
I tried using the same imports in my project and analyzed the bundle using nextjs bundle analyzer, and even after tree shaking the project and building it, I end up with almost 2x bigger size while using client-fetch sdk, that's sad
s
@bland-eye-99092 i noticed since 1.11.6 @most-van-96958/client-fetch depends on axios again. Is this intended or a bug?
b
It's a bug, a fix should be released in the coming days.
👍 1