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.

Livereload for Ionic React app

See original GitHub issue

Is the livereload for this electron platform currently possible?

I have an Ionic React app. I’m trying calling this command from project root folder: ionic cap run @capacitor-community/electron -l

It first tries to add the electron platform again: capacitor add @capacitor-community/electron which fails with Error: Electron platform already exists. but continues with build process, so in my case these steps:

react-scripts start capacitor copy @capacitor-community/electron capacitor open @capacitor-community/electron

So in the end, it opens the electron window, but the content displayed is outdated - actually an old build I made in the past by manually doing ionic build && npx cap copy The content is not live-reloaded.

Am I doing something wrong or livereload is not available for electron?

Thank you!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
IT-MikeScommented, Aug 27, 2020

Currently no, live reload does not work with electron, but its a good idea for a future release. 👍

1reaction
polisettyManojcommented, Dec 8, 2021

I don’t know if it helps, but I’m using Ionic with Angular and I used electron-reload" I added those lines in electron/src/index.ts

  electron: path.join(__dirname, 'node_modules', '.bin', 'electron')
});

and live reloading is now working

Can you give me the steps for live reload ??

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rapid App Development with Live Reload | Ionic Documentation
We can use the Ionic CLI's Live Reload functionality to boost our productivity when building Ionic apps. When active, Live Reload will reload...
Read more >
Running React with Ionic Capacitor & Live Reload
Ionic Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android, Electron, and...
Read more >
Running React with Ionic Capacitor and Live Reload
Ionic Capacitor is a cross-platform app runtime that makes it easy to build web apps that run natively on iOS, Android, Electron, and...
Read more >
Live Reload | Capacitor Documentation
Live Reload is useful for debugging both the web portion of an app as well as native functionality on device hardware or simulators....
Read more >
Ionic react live reload not working for some files with ionic serve
When running ionic serve , the browser (doesn't matter which one) doesn't reload changes in tsx files - nothing happens when saving these ......
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