ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 302 forks source link

ionic cordova browser emulate(or run) --l does not live reload #1155

Open AmitMY opened 7 years ago

AmitMY commented 7 years ago

Short description of the problem:

Emulating/Running on iOS/Android with live reload works, but not on browser.

What behavior are you expecting?

Browser to update every time the code changes, like it does on iOS/Android

Steps to reproduce:

  1. ionic start test blank
  2. cd test
  3. ionic cordova platform add browser
  4. ionic cordova emulate browser --l
  5. Change some code, it will say it is building, but the browser will still have the old version.

Which @ionic/app-scripts version are you using? ^2.1.3

mhartington commented 7 years ago

Hi! So the cordova-browser platform has been very problematic and is not something that should be used. Please instead just use ionic serve to test in the browser.

AmitMY commented 7 years ago

serve does not cut it for apps that use cordova plugins that are already browser supported, and even though I have dummy mocks, I love to see it live if possible to see if the plugins are going ok. So if there is a way to fix this to work like devices, I'd be extremely happy, and it will save me a lot of time writing functional mocks for serve :)

ciekawy commented 6 years ago

anything has changed here? I'm in a similar situation developing an app using cordova plugins

gerhardcit commented 6 years ago

@AmitMY , @ciekawy have you had any luck here. We facing the same problem. Trying to use Native plugins that supposable browser compatible. When you use "serve" cordova does not load and you are stuck. When will Ionic handle this better?

IonelLupu commented 5 years ago

Having the same problem here. I have to manually stop and rerun the command ionic cordova emulate browser

ciekawy commented 5 years ago

what works for me enabling cordova plugins (only those available for browser platform) during development with browser is

ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build

in package.json scripts section I've created

"ionic:serve": "ionic-app-scripts serve --sourceMap source-map --iscordovaserve --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build",

entry and using it as npm run ionic:serve