So, following https://stackoverflow.com/a/46512165/4522960:
I'm now a bit confused with what's the issue is.
Originally I though it was the fact that you're not able to consume the module from an external package, but not it seems like you're attempting to import it from the same package?
See fork that attempt to demonstrate a flow in which the package is independently built following an install.
This is only the general idea, ignoring module-system issues and package duplicates.
Is this what you were aiming for?
Also, see https://medium.com/@BrodaNoel/how-to-create-a-react-component-and-publish-it-in-npm-668ad7d363ce
So, following https://stackoverflow.com/a/46512165/4522960:
I'm now a bit confused with what's the issue is.
Originally I though it was the fact that you're not able to consume the module from an external package, but not it seems like you're attempting to import it from the same package?
See fork that attempt to demonstrate a flow in which the package is independently built following an install.
This is only the general idea, ignoring module-system issues and package duplicates.
Is this what you were aiming for?
Also, see https://medium.com/@BrodaNoel/how-to-create-a-react-component-and-publish-it-in-npm-668ad7d363ce