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

Webpack loader blocks all requests silently if webpack-stats hangs at "compile" #341

Open
wkleinheerenbrink opened this issue Feb 16, 2023 · 1 comment

Comments

@wkleinheerenbrink
Copy link

Currently the 'runserver' command hangs in an infinite loop when webpack-stats has 'status = "compile"'. This is caused by an infinite while loop that is waiting for a different status than 'compile'.

https://github.com/django-webpack/django-webpack-loader/blob/master/webpack_loader/loader.py#L95-L103

The webpack loader has 0 as default for the timeout; ie. 'never timeout'. This results in Django Runserver never emitting any pages (eg. /admin/), without any warning.

I see two possible fixes:

  1. Add a default timeout other than 0
  2. If changing default is not preferred, perhaps add a warning to console mentioning the script is hanging at webpack loader
@fjsj
Copy link
Member

fjsj commented Feb 16, 2023

a warning to console mentioning the script is hanging at webpack loader

This LGTM if a certain time has passed (> 5 seconds, perhaps)?
Please feel free to open a PR with this behavior.

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