website
website copied to clipboard
Allow search to filter by module size
I would love to be able to
- see the size of a module directly in the search results
- filter the search based on the size of the module (e.g. only show modules with 5kb or less)
I think this would help a lot to choose which modules to pick and to reduce package bloat.
I don't currently have that data in the index, so it won't be able to sort on that right now. What I do now is request data from bundlephobia when people go to the detail page. @pastelsky, could it be an option to get the data in the indexing strategy instead? Maybe we can have it cached somehow?
Are you willing to contribute to this @queicherius ? :)
Are you willing to contribute to this @queicherius ? :)
I'd be happy to whip of a frontend for this if/when it gets into the index 👍
@Haroenv The nature of the bundlephobia API doesn't lend itself well to bulk queries. How do you think requests to it would come?
Bundlephobia seems to cache past builds sizes, is there maybe a way to only ask for those?
I think that's the main issue here now, how to get the data in the index without making the process a lot slower (now takes 20h for a full reindex, which happens weekly). Maybe a separate package can be automatically made weekly in a different process, or some kind of db everything cached can be stored in which could be shared by both projects?