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

Detect HMR and disable autoRestart if one is presented #21

Open
atassis opened this issue Jul 12, 2022 · 3 comments
Open

Detect HMR and disable autoRestart if one is presented #21

atassis opened this issue Jul 12, 2022 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@atassis
Copy link
Owner

atassis commented Jul 12, 2022

#20 related

Ideally, the code would be smart enough to detect that HMR is in use, but at the minimum, there should be documentation present regarding the autoRestart flag.

@atassis atassis added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 12, 2022
@sibelius
Copy link

sibelius commented Aug 1, 2024

have you figure it this out ?

@atassis
Copy link
Owner Author

atassis commented Aug 1, 2024

At that time I was thinking about moving dev server from backend to root webpack config- an array of configurations. But I haven't managed to make it properly (so that hmr hooks up properly, etc), it was easier for me to make backend code changes and restart client app in browser if needed.
The thing is this exact issue is out of scope of this particular plugin IMHO. It does what it does, hmr should be resolved separately.
While I was writing this, I came to an idea to make a debounced delay for restart to let HMR send the changes to the client and then restart the script (I am not sure if plugin has an access to the inner webpack instance of client)

@sibelius
Copy link

sibelius commented Aug 1, 2024

I think you can get hmr info inside the plugin, we just need to figure it out how

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants