How do I exclude bundling libs like react when building a react plugin?

option 1: tsup

https://tsup.egoist.dev/#excluding-packages

option 2: rollup external

https://www.npmjs.com/package/rollup-plugin-peer-deps-external