Ionic Plugins directory and its purpose

Hi,

I’m a bit confused about the plugins directory with Ionic.

A couple of months ago when I first started playing with Ionic, a “ionic start myApp tabs” would install the following plugins by default.

  • com.ionic.keyboard
  • org.apache.cordova.console
  • org.apache.cordova.device

Today executing the same command and only the “com.ionic.keyboard” plugin is installed.

At first I thought maybe some sort of optimisation was done so that the other plugins were not required. But I noticed that the plugins folder is ignored to git.

I deleted the plugins folder and the platforms folder, ran a “ionic platform add android”, then “ionic build” and “ionic run” and to my surprise the plugins folder was not restored.

At what point is the plugins folder required and when is it restored? Tis a mystery!

I understand this might be related to Cordova’s architecture, but I started with Ionic so I thought here would be the best place to ask. Apologies if it is not.

1 Like