How to handle <hook> in cordova plugin

I met an issue when integreate BlackBerry Dynamics SDK with Ionic + Capacitor.
It seems that npx cap sync will not run hook in cordova plugin.
Here’s the sample: hook type=“after_plugin_add” src=“scripts/hooks/afterPluginAdd.js”
Is there a way to handle this kind of plugin?

Capacitor doesn’t run cordova hooks.

You can check scripts/hooks/afterPluginAdd.js code, see what it does and try to do the same.