Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When the app is reloaded the original terminal is closed #13

Open
ibc opened this issue Jun 15, 2020 · 7 comments
Open

When the app is reloaded the original terminal is closed #13

ibc opened this issue Jun 15, 2020 · 7 comments

Comments

@ibc
Copy link

ibc commented Jun 15, 2020

I run my Electron app using electron ./build/index.js, it logs to stdout/stderr and I also run a repl terminal. However, when using this library and any file is modified (so the app is restarted), the process running in the terminal is terminated and I no longer see logs.

Is this expected?

@fynnay
Copy link

fynnay commented Aug 27, 2020

I'm also experiencing this.

@binyamin
Copy link

binyamin commented Feb 7, 2021

If you just need static files reloaded, you can insert the following code in the renderer process.

const watcher = require("chokidar").watch(path.join(__dirname, "public"));

watcher.on("change", () => {
    for (const window_ of BrowserWindow.getAllWindows()) {
        window_.webContents.reloadIgnoringCache();

        for (const view_ of window_.getBrowserViews()) {
            view_.webContents.reloadIgnoringCache();
        }
    }
})

@amon-talha
Copy link

amon-talha commented Aug 16, 2021

I'm experiencing this too.
is it a bug and did anyone found the fix for it?

@Awendel
Copy link

Awendel commented Aug 25, 2021

Same thing here,
makes development / debuggin pretty much impossible and hence voids the purpose of this module.

@jslmariano
Copy link

+1

@heberuriegas
Copy link

Anyone solve this in some way?

@Awendel
Copy link

Awendel commented Mar 6, 2022

Anyone solve this in some way?

no sorry, currently using electronmon, which does the job just fine.

although they have the problem of not correctly reloading BrowserViews, if you make use of those.
I created an issue though where I show a solution to fix that though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants