Ionic-app-scripts: ionic cordova browser emulate(or run) --l does not live reload

Created on 28 Jul 2017  路  6Comments  路  Source: ionic-team/ionic-app-scripts

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

Most helpful comment

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 :)

All 6 comments

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.

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 :)

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

@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?

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jgw96 picture jgw96  路  4Comments

danbucholtz picture danbucholtz  路  4Comments

hermitdemschoenenleben picture hermitdemschoenenleben  路  3Comments

janpio picture janpio  路  3Comments

brandyscarney picture brandyscarney  路  4Comments