Why do I have multiple React imports in my Rollup bundle and how can I resolve it?
I’m using Rollup to bundle my custom npm react library, but I’m encountering multiple import statements for React and ReactDOM in the bundled output, and getting errors like cannot import (useContext | useState ...) of undefined
in my host app. Here is an example of the import statements in the bundle: