Axios and fetch files
# support-questions
b
Hey there, I'm using supertokens-web-js in a Next.js project and after running bundle analyzer I can see that supertokens-website is a dependency, which appears to contain a fetch.js (I assume it's a fetch polyfill), axios.js, and other related modules that I would rather not include in the bundle. Is this expected, and if so would there be any scope in the future for passing in a fetch function when initialising supertokens?
r
Hey @bobs_ramen those aren’t polyfills. They r interceptors that we add to fetch and axios for session management to work.
b
@rp Ah ok, thanks for getting back to me. Adding supertokens increased our initial js bundle by about 22% so I was hoping it able to be trimmed down a bit but I guess we just have to deal with it 😄 We love the library btw!
r
Thanks! How much was the original bundle size btw?
b
My original calculation was off but my app bundle went from 67.87 -> 91.06 gzipped. sound about right?
r
yea, that makes sense. Our web-js SDK does add that much (depending on which recipe is being used)