Conditionally excluding module from bundle

I am making a project using the same react native code base for both a mobile and web application. Stripe's react native SDK does not work on web at the moment. Does anyone know of a way to exclude that module when running on web using preferably the metro bundler? If you do not know of a way with the metro bundler do you know how to do this with alternatives?
1 Reply
Wezter
Wezter17mo ago
Did you find a solution for your problem? If not maybe you could take some inspiration for how it's done with Solito (using .web files for your web only dependencies and installing them only in the web application)
Want results from more Discord servers?
Add your server