package size is very large, bloats dependent libraries and gives next.js heartburn #2060
Open
1 of 5 tasks
Labels
bug
Something isn't working
Search terms you've used
package, size, rollup
Impacted package
Which packages do you think might be impacted by the bug ?
Bug description
When we use this package as a dependency it adds ~100k (after minification and gzipping) to the size of the parent.
We suspect this is related somehow to the fact that this package is 3.39MB unpacked according to NPM:
https://www.npmjs.com/package/@inrupt/solid-client-authn-browser
We first discovered this while trying to debug failing Next.js builds and have an open ticket there:
vercel/next.js#35602
We've tracked this down to some combination of
swrlit
,@inrupt/solid-client
and@inrupt/solid-client-authn-browser
and strongly suspect the issue is with one of the Inrupt libraries. Including@inrupt/solid-client
bloats the minified/gzipped CJS package by ~90kB (but not the ESM package!) and including@inrupt/solid-client-authn-browser
bloats both the CJS and ESM minified/gzipped packages by ~100kB.To Reproduce
src/index.ts
and uncommentimport "@inrupt/solid-client-authn-browser"
npm install
npm run build && npm run size
Expected result
Minified/gzipped package size should be under 10kB
Actual result
Minified/gzipped package size is 102.78 kB
Environment
Additional information
This is a very strange issue - I tried fiddling with the rollup build a bit but didn't have any luck. The Next.js build issue is non-deterministic but seems related to the weight of this dependency. Have been working on debugging this for several days and have tried many things - happy to chat in higher bandwidth if that would be helpful!
The text was updated successfully, but these errors were encountered: