eduardoborges / use-mask-input

✏️ A react Hook for build elegant input masks. Compatible with React Hook Form
https://npmjs.com/package/use-mask-input
265 stars 13 forks source link

Bundle size question #69

Closed kylemh closed 8 months ago

kylemh commented 9 months ago

Hello! I noticed that bundlephobia lists this dependency as extremely large: https://bundlephobia.com/package/use-mask-input@3.3.7

but then I saw you have no direct dependencies so I'm kinda questioning the value...

If it's not minified and uglified into a dist, I'm guess I just need to include the external module for transpilation? I'm using Next.js so I'd just use: https://nextjs.org/docs/app/api-reference/next-config-js/transpilePackages

Does all this sound right?

eduardoborges commented 8 months ago

Hey @kylemh, the lib uses inputmask to handle masks, i just build a react abstraction. Buuut, the inputmask has a lot of resolving problems, the best solution for that its embed into main dist, resulting in a large final bundle.

The good news is: im working on a v3 a lot smaller <3

kylemh commented 8 months ago

i look forward to it