electron-reloader
electron-reloader copied to clipboard
Add a note to README indicating that using electron-reloader in a static script avoids problems with transpiling main electron process
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.
Thanks for the workaround