How to prevent a plugin to be loaded when building web target

I’m using react-native-firebase for android and ios but since it doesn’t support web target it crashes the web app on load. I’d like to conditionally load the @react-native-firebase/app plugin based on the build target.