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

Add a note to README indicating that using electron-reloader in a static script avoids problems with transpiling main electron process #19

Open
feljx opened this issue Feb 27, 2021 · 1 comment

Comments

@feljx
Copy link

feljx commented Feb 27, 2021

My project is in Typescript so I do transpile the main process files.
It didn't work when I added the try...catch in the main module before transpilation, but I was able to add a simple script like the following and that worked.

require('./application')
try {
    const options = {
        debug: true,
        ignore: [ 'src' ]
    }
    require('electron-reloader')(module, options)
} catch (err) {
    console.log(err)
}

I require the main module after transpilation and copy this wrapper script as a static asset for development mode only.
A little node in the README could point users to this workaround.

@feljx feljx changed the title Add a note to README indicating that adding electron-reloader avoids problems with transpiling main electron process Add a note to README indicating that using electron-reloader in a static script avoids problems with transpiling main electron process Feb 27, 2021
@kidroca
Copy link

kidroca commented Sep 30, 2022

Thanks for the workaround

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

2 participants