I'm trying to create a new react.js package for my project, I've used the rollup and its plugin to create my package, but I've some problems with it, coding was going well since I've used react.js useRef hook, it seems the rollup cannot work as well with react.js v18 and got this error:
Uncaught TypeError: Cannot read properties of null (reading 'useRef')
I've tried add react and react-dom packages as peer dependencies and use rollup related package to consider these two packages as external, also I tried
external: ["react", "react-dom"]
but this didn't work too, and many other ways to fix this problem, so I decided to use another tool, an alternative for rollup which works as well as rollup, could you suggest to me tools that you've used and were satisfied with?
there are many, few which are famous are parcel, webpack, vite