I installed Cordova and Ionic Native plugins into the ionic3 project.
But I need to remove only that specific Cordova and Ionic Native plugins from the project completely. (With its dependencies like npm
).
Is there any proper way to do that?
Appreciate any kind of your help.
Thank you!
It is not possible to remove plugins or platforms in this manner. The recommended method of adding and removing plugins and platforms is with the command line cordova commands cordova plugin add|remove ... and cordova platform add|remove ... to avoid any out of sync issues.
Sometimes user remove plugins by deleting the plugin folder from plugins folder, but the plugin is defined in config. xml as well as package. json . Removing the plugin using the CLI removes all trace of it.
I just refer their document here.
Example:
To install a plugin we are using following way.
ionic cordova plugin add <plugin-name>
(ionic cordova plugin add cordova-plugin-dialogs
)
npm install --save @ionic-native/<npm-name-of-plugin>
(npm install --save @ionic-native/dialogs
)
To Uninstall the plugin just need to revert above things back as bellow
ionic cordova plugin remove <plugin-name>
or ionic cordova plugin rm <plugin-name>
(ionic cordova plugin remove cordova-plugin-dialogs
) or (ionic cordova plugin rm cordova-plugin-dialogs
)
Finally uninstall the associated Ionic Native package(s) from npm
npm uninstall --save @ionic-native/<npm-name-of-plugin>
(npm uninstall --save @ionic-native/dialogs
)
The --save flag will remove the project's package.json entry for that plugin
Doing above things helps me to remove plugin completely with its npm dependencies from the project. Hope this will useful to someone else
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With