Correct way to import a Cordova plugin into a Capacitor 5 / Ionic React project?

When trying to import the Cordova plugin into my project, it tells me the module is not available. I couldn’t find anything in the documentation, so would anyone have any good example of the correct way to import the plugin into my project?


In Capacitor you use the Cordova plugins the same way you would use them in Cordova, that’s why there is no specific documentation about it, because it’s not different.

Most Cordova plugins don’t have typescript types, so you don’t import them, you just use them as explained in their docs.
If you are using ionic-native or awesome-cordova-plugins for having typescript types, then check their docs.