chunkLoadTimeout has to be cleared, if a request for a chunk fails
See original GitHub issueFeature request
I’m not sure, is it a bug or a feature request. We have an option chunkLoadTimeout
in output. Here is a link to the docs. chunkLoadTimeout
is the Number of milliseconds before chunk request expires. But there is a problem, when a request fails.
Let’s imagine, that we have a retry for a dynamic import. If the request for a chunk failed with a 500 code (for example), webpack will wait 12000 ms by default before the retry will be executed, cause import-Promise won’t be resolved/rejected during chunkLoadTimeout
.
What is the expected behavior?
timeout should be cleared
What is motivation or use case for adding/changing the behavior?
Retry is not working properly
How should this be implemented in your opinion?
Just clear timeout on an error event.
Are you willing to work on this yourself?
Yeap, if it is ok for the core team)
So, there is an idea to clearTimeout, if the request failed. What do you think?
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (8 by maintainers)
Top GitHub Comments
@alexander-akait https://github.com/webpack/webpack.js.org/pull/5960 pull-request is ready)
@sokra up) We need your opinion)