简体   繁体   中英

Can we just add Cordova plugins to package.json?

When do we need to save a plugin in config.xml?

Normally we use cordova plugin add <plugin-name> to add and save the plugin into our package.json

The Cordova documentation says that those plugins into config.xml will be restored during a prepare . What does this mean? Can we just set plugins in one place? Is there any problem having plugins only in package.json? Also I checked previous answers but it's still confusing me.

Thank you so much for your time: ) Note: I'm using Cordova 9.0.0

Cordova 9.0.0 no longer uses config.xml as the source of plugin (or platform) data/versions.

https://github.com/apache/cordova-docs/issues/1004

Now, everything is just in one place: ) in package.json so we can remove platforms and plugins from config.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM