I have seen multiple issues and blog posts on how to use tsup with react. Often, I see:
--inject
option for react imports--external react
optionUnfortunately, solving the ReferenceError: React is not defined
error only leads to the Unhandled Runtime Error
and Error: Invalid hook call.
.
I can’t seem to figure out how to use tsup with react. I’d love a workaround, though ideally tsup would support react without any configuration necessary.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too