question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support livereload for `ionic cordova run browser`

See original GitHub issue

origin: https://github.com/ionic-team/ionic-cli/issues/3036 and https://github.com/ionic-team/ionic-cli/issues/3036#issuecomment-376662587

We can inject all the Cordova www assets into the livereload dev server, providing a nice experience for developing mobile apps in ionic serve.

📝 Note: for developing cross-platform apps (attempting to target mobile AND desktop), I still highly recommend not using the Cordova browser platform. My reasoning is here: https://github.com/ionic-team/ionic-cli/issues/2312#issuecomment-365732607

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:14
  • Comments:30 (8 by maintainers)

github_iconTop GitHub Comments

22reactions
imhoffdcommented, Jul 30, 2018

Just leaving a super quick note: This may be possible in CLI 4/Ionic 4 by running the following:

ionic serve --cordova --platform browser

(untested)

10reactions
iva2kcommented, Jun 3, 2018

These two arguments are given against:

ionic serve doing anything with the Cordova Browser platform would be really unexpected and confusing.

The basic argument against the browser platform is that is pretty much an unkown

… are not to the point and have nothing to do with Ionic mission.

I see a huge value in having Cordova in ionic serve.

At a minimum, it is only consistent with Ionic being built on top of Cordova, and having parity for all Cordova platforms, regardless of their current state. I’m sure no one will be confused if ionic serve supports Cordova with --cordova option.

Next, browser support in Cordova will be improving with time. And it is known to some people. It is only a matter of more contributions to browser platform in Cordova, as browsers these days support a lot of native functions like camera.

Having Ionic fully support all Cordova platforms, including browser, will give it a boost and stimulate further development.

Trying to patch Cordova’s static server with livereload is futile, why waste energy there? ionic serve --cordova is very logical, consistent and desirable. The ones who are against it, can simply avoid adding --cordova to their ionic serve, like they were always doing.

I see the future when developing for all platforms will be possible in a single environment. And I believe Microsoft won’t be it. ionic serve --cordova is one little step towards this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Live Reload | Ionic Documentation
Live Reload is a conflated term. With ionic serve , Live Reload just refers to reloading the browser when changes are made. Live...
Read more >
ionic run browser --livereload not working - Stack Overflow
When you run the command ionic cordova run browser --livereload you will see something like this in CLI:
Read more >
ionic cordova run <platform> - Fig.io
Run an Ionic project on a connected device. ... ionic cordova run <platform> ... --livereload, -l, Spin up dev server to live-reload www...
Read more >
Live Reload | Capacitor Documentation
Use Live Reload to easily debug the web and native portions of an app on a device or simulator.
Read more >
ionic cordova_not_available | The AI Search Engine You Control
ionic cordova run browser. This will build and run your project in a browser. Development friend live reload / source maps / fast...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found