I have a lot of trouble understanding how plugins are installed, removed, updated.
I have a list of plugins with versions in plugins/fetch.json
A list of plugins in config.xml
A list of plugins in package.json
I assumed that the best way to install and remove plugins was withionic add plugin_name
and ionic rm plugin_name
.
But when you remove them, config.xml
is not updated and it will reinstall whatever is in there automatically.
Also, I have no idea how my plugins got into the config.xml
file in the first place. Also, why they are version locked and does that file even matters because it’s never updated automatically.
Example of confusion. I update my android version
cordova platform remove android cordova platform add android@6.X.X
It says it is installing plugins, but none of these files change.
Is it because those commands only affect the platform folder directly?
I am also confused about the CLI’s ionic state save
and ionic state restore
… I thought that ionic state save
would update my package.json
from the platform info and ionic state restore
would do the opposite. But then why doensn’t the config.xml
update… is the config.xml
even important? I figured out that running --save
would update the config.xml, but I don’t get why and when we should do that.
This issue says that we should now use cordova plugin add plugin_name
but all the docs say to use ionic plugin add plugin_name
.
I am very confused about how to approach plugins and how to update them properly and I can’t find any documentation to clearly guide me through, so any help is very welcome.