The JavaScript library downloaded by npm has a lot of files and folders besides dist directory. I don’t want to download these. What should I do?

  node.js, question

I don’t need miscellaneous files, is there any way not to download these files?

You can’t, this is not your control, but the library author’s responsibility. Lookfiles, that the author in his librarypackage.jsonInside is not well usedfilesFields. This is his mistake