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

fix egde case where a HMR chunk is incorrectly downloaded #15586

Merged
merged 1 commit into from Apr 1, 2022

Conversation

sokra
Copy link
Member

@sokra sokra commented Mar 25, 2022

fix egde case where a HMR chunk is incorrectly downloaded when loading a unchanged chunk during HMR downloading

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
nothing

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@tmeasday
Copy link
Contributor

tmeasday commented Mar 31, 2022

@sokra I applied this patch to the original issue described in #15541

What I observed:

  • In the reproduction repo (where we trigger a bug via hitting multiple route w/ playwright) it didn't really make much difference.

  • In an actual larger app, where you can trigger the issue by quickly changing "routes" (components in storybook), the behaviour changed (probably you'd say improved) but didn't resolve:

    • Previously (on the lazy-compilation branch, if you change routes quickly (run yarn storybook, then in the browser, use the cmd-down shortcut repeatedly to jump between components), you would eventually see a 404 which bubbles up as an error from import():

image

image

@sokra sokra force-pushed the bugfix/chunk-load-during-hmr branch from 9aae364 to e1179bf Compare April 1, 2022 12:46
@sokra
Copy link
Member Author

sokra commented Apr 1, 2022

Yeah, there were some obvious bugs in my PR. I hope they are fixed now...

@sokra sokra merged commit c3f5897 into main Apr 1, 2022
@sokra sokra deleted the bugfix/chunk-load-during-hmr branch April 1, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants