How to add Live Reload when using the command cordova serve?

后端 未结 6 651
北恋
北恋 2021-02-01 22:17

I am using this command to open up my app in the browser: cordova serve but it does not refresh itself when I update my code. How can I do that?

I have trie

6条回答
  •  伪装坚强ぢ
    2021-02-01 22:55

    You could try the Cordova Browsersync plugin. Instructions to use the plugin are in the plugin's repo.

    Once you add this plugin using cordova plugin add cordova-plugin-browsersync, you can simply use cordova run -- --live-reload to start live reload. Note that this also enables syncing scrolls and clicks if you have multiple devices.

提交回复
热议问题