feat: add a "live reload flag"
See original GitHub issueFeature Request
Ionic version: [x] 4.7.1
Describe the Feature Request
Provide a way to determine when we are running Ionic using the --livereload
flag.
Describe Preferred Solution
When we are using the --livereload
flag to debug the an in a Device, a way to recognize this should be available either with a platform.isLiveReload()
or an window.isIonicLiveReload
flag.
Describe Alternatives
For ionic 3 I was snipping the URL for see if localhost
is not present. It does not work anymore.
Other options where to look into the window object for an IonicDevServer
object. It does not work anymore.
As current workaround I am making a proxy of the WebSocket class to check when a connection is made. I wanted to put that code in a PR but I didn’t knew in which file should I do it.
Additional Context Some functionality needs workarounds or other way to handle. Example: Load media files from the device internal storage will throw CORS errors in livereload.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Can this please be merged soon? It would help us implement a feature that we are using right now.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.