Support livereload for `ionic cordova run browser`
See original GitHub issueorigin: 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:
- Created 5 years ago
- Reactions:14
- Comments:30 (8 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just leaving a super quick note: This may be possible in CLI 4/Ionic 4 by running the following:
(untested)
These two arguments are given against:
… 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 theirionic 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.