nparashuram / cordova-plugin-browsersync

BrowserSync Plugin for Cordova
110 stars 69 forks source link

webpack integration #29

Closed badpenguin closed 6 years ago

badpenguin commented 7 years ago

I wish to integrate this in react. Do you have an example how to trigger the app from webpack? I mean i've Browsersync running on webpack but the app does not respond to changes because i just used "cordova run" to start the emulator without the --live-reload option. I need "cordova run" to quit as soon the emulator start because is webpack providing the compilation.

QuentinRoy commented 7 years ago

Run webpack with --watch and make it compile the www folder, then run cordova with --live-reload and it should work. Webpack will recompile your source each time its change and replace www, and browsersync will detect the change in www and update your apps.