Skip to content

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

Merged
sokra merged 1 commit into
mainfrom
bugfix/chunk-load-during-hmr
Apr 1, 2022
Merged

fix egde case where a HMR chunk is incorrectly downloaded #15586
sokra merged 1 commit into
mainfrom
bugfix/chunk-load-during-hmr

Conversation

@sokra

@sokra sokra commented Mar 25, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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

tmeasday commented Mar 31, 2022

Copy link
Copy Markdown
Contributor

@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

sokra commented Apr 1, 2022

Copy link
Copy Markdown
Member Author

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.

3 participants