Is there a (better) way to get the exported components from an installed library from node_modules, given the paths of the files? The only way I can think of is to parse the file, line by line, and look for them.
To give you the context, I am writing an eslint plugin to replace some imported components to a new library, with a new structure. I want, by giving the paths of the indexes (in node_modules folder), the plugin to be able to fetch the exported components and replace everything by itself. I believe this was done before but I can not find a good solution.