-
-
Notifications
You must be signed in to change notification settings - Fork 385
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: js exception when reloading async chunk (#444) #531
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test
Or please create reproducible test repo |
Reproducible test branch. I will try to write test, but it can take a while to investigate, how to write such test. |
Codecov Report
@@ Coverage Diff @@
## master #531 +/- ##
==========================================
+ Coverage 88.49% 88.83% +0.33%
==========================================
Files 5 5
Lines 426 430 +4
Branches 94 95 +1
==========================================
+ Hits 377 382 +5
+ Misses 47 46 -1
Partials 2 2
Continue to review full report at Codecov.
|
// Used from tests | ||
module.exports.clearCache = function() { | ||
srcByModuleId = Object.create(null); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use mock for test it, no need it in runtime code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to mock variable inside module?
Currently value inside srcByModuleId
persists between tests and my situation happens only if it's clear.
This PR contains a:
Motivation / Use-Case
HMR throws exception every time when I do edits in my css files:
This fix ignores such obviously wrong updates and allows to use
options.reloadAll
, because this exception happens just beforereloadAll()
call.Issue — #444
Breaking Changes
None.