So, I need to create a npm react components and JS utility library, I'm using webpack but I have 2 problems.
How can I compile the code (react code) and import like import { Component } from 'my-lib'; in a way that the final app only have the code imported and not the rest of the lib content.
Some components/utils inside the library have extra dependencies, but sometimes the final project doesn't need those parts of the lib, and of course, adding those extra dependecies is not needed... But in my lib it says the dependency is needed to be installed in the final project.
I need some guide or start point to take a look.
Thanks!