Skip to content

Conversation

@okoskimi
Copy link

Hi,

I was looking for an electron-with-react-and-typescript template and yours looks very good. It doesn't support automatic reload for the main part after code changes though, so I created a patch for that. It uses the nodemon-webpack-plugin to automatically restart electron after changes in the main part.

Caveat: I'm new to electron, so I can't rule out unforeseen side effects, but as far as I could tell the patch works as desired.

BR,
--Oskari

@okoskimi
Copy link
Author

Oops, I didn't realize there was already an open pull request for the same thing. Should have looked beforehand, but it was such a small change, what were the odds... Anyway, the solutions are similar but not identical, so interesting to compare at least.

@danutzcodrescu
Copy link

@okoskimi I personally find your solution cleaner than mine.


module.exports = merge.smart(baseConfig, {
target: 'electron-main',
watch: true,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add this, I believe you need the inverse on webpack.main.prod.config.js since it inherits the config from this.

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

Successfully merging this pull request may close these issues.

3 participants