damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20170728-OrderOfCordovaPluginsMatters.html #56

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20170728-OrderOfCordovaPluginsMatters.html

damirarh commented 1 year ago

Imported comment written by Will on 2017-08-21T18:49:33

What version of cordova are you using? I have just upgraded to 7.x and plugins now seem to be sorted alphabetically.

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2017-08-21T19:40:00

I encountered this in Cordova 6.x. I haven't yet made the jump to 7.x as I'm currently working on two applications that are pretty late in the release cycle.

damirarh commented 1 year ago

Imported comment written by Will on 2017-08-21T20:20:36

Ok. Let me know if you encounter some issue when you upgrade. Since cordova 7.x adds plugins and now sorts them alphabetically, I don't think you'll be able to guarantee plugin order based on which plugin has been added last or the order in which it's specified in the package.json file. The package.json file seems to be re-generated after running the add command.

damirarh commented 1 year ago

Imported comment written by Damir Arh on 2017-12-26T09:16:45

Cordova 7.0 indeed sorts the plugins alphabetically in config.xml when invoking "cordova prepare", making the above approach useless. However, this behavior has been fixed again in Cordova 7.1: the order in config.xml remains intact and my solution seems to work again. The recently released Cordova 8.0 is also behaving the same.