Closed ThisIsManta closed 7 months ago
I just installed this library into a Next.js project, did an import (import { useMediaQuery } from '@uidotdev/usehooks'
) and only that import was included in the final bundle. So tree shaking is working for me.
To keep my bundle small, I don't use all the hooks provided by the package, but only
useLocalStorage
. It would be nice if you make this package tree-shake-able or at least split index.js into many useXXX.js files.