0

I'm the development of cordova plugin in android.

Updating the javascript of Cordova plugin are not updated.

  1. change:"./test/plugins/cordova-plugin-whitelist/whitelist.js"
  2. cordova build android
    • Expect the update:/test/platforms/android/assets/www/plugins/cordova-plugin-whitelist/whitelist.js

In the version up of cordova it seems behavior has changed.

  • 5.3.3-: OK
  • 5.4.1+: NG

Thank you,

user3419390
  • 71
  • 1
  • 5
  • Does this answer your question? [Update cordova plugins in one command](https://stackoverflow.com/questions/28783968/update-cordova-plugins-in-one-command) – sonyisda1 Jun 17 '20 at 18:46

2 Answers2

1

Instead of updating the plugin, I've found that I can remove it and re-add it. In my case, I'm referencing the plugin source code locally, via the --link option:

cordova plugin rm plugin-name
cordova plugin add custom-plugins/plugin-name --link

To make sure the correct version number is reflected in the newly added plugin, you can use:

cordova plugin ls
Mark McClelland
  • 4,980
  • 4
  • 35
  • 48
-2

Run The below command

cordova plugin update plugin-name
NGB
  • 71
  • 1
  • 15
  • Don't see the `update` parameter as an available option. According to this [SO answer](https://stackoverflow.com/a/28802478), the way to do it without any custom helpers is to first remove and then re-add – sonyisda1 Jun 17 '20 at 18:45
  • Output: Cordova does not know update; try `cordova help` for a list of all the available commands. – slothstronaut Jun 16 '21 at 22:19