You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// deps/a.jsexport*from'./b'// deps/b.jsexport*from'./c'exportfunctionb(){}// <-- this extra export is needed to reproduce// deps/c.jsexportfunctionc(){}
And in index.js:
import{c}from'./deps/a'// other parts of the codebase, unrelated to depsimport{hot}from'./hot'hot()module.hot.accept('./hot',()=>{hot()})
After starting WDS and edit ./hot.js, the first HMR update somehow includes ./deps/a (although it never changed), and causes the page to do a full reload. However, this only happens for the first update. After the first HMR-caused page reload, HRM starts to function properly.
Directly importing from ./dps/b or ./dpes/c both work as expected. Removing the named export in ./deps/b also works as expected.
What is the expected behavior?
First HMR update should not include deps/a.js (which is not hot-accepted, thus causing the entire page to reload)
Bug report
What is the current behavior?
First HMR update after dev server start includes files that did not change, when the following conditions are met:
If the current behavior is a bug, please provide the steps to reproduce.
Repro link
With the following dependency graph:
And in
index.js
:After starting WDS and edit
./hot.js
, the first HMR update somehow includes./deps/a
(although it never changed), and causes the page to do a full reload. However, this only happens for the first update. After the first HMR-caused page reload, HRM starts to function properly.Directly importing from
./dps/b
or./dpes/c
both work as expected. Removing the named export in./deps/b
also works as expected.What is the expected behavior?
First HMR update should not include
deps/a.js
(which is not hot-accepted, thus causing the entire page to reload)Other relevant information:
webpack version: v4.41.4 & v5.0.0-beta.10
Node.js version: v12.13.1
Operating System: macOS 10.14.6
Additional tools: N/A
The text was updated successfully, but these errors were encountered: