Skip to content

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

@feljx

Description

@feljx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions