mirror of https://github.com/status-im/metro.git
HMR: Include updated modules in the correct order
Reviewed By: davidaurelio Differential Revision: D5852269 fbshipit-source-id: 519564a4899b22d16a2ab3be4b466e21783e8f86
This commit is contained in:
parent
a7ad7502aa
commit
f6e2e17900
|
@ -129,7 +129,10 @@ class HmrServer<TClient: Client> {
|
|||
// The Delta Bundle can have null objects: these correspond to deleted
|
||||
// modules, which we don't need to send to the client.
|
||||
if (module != null) {
|
||||
modules.push({id, code: module.code});
|
||||
// When there are new modules added on the dependency tree, they are
|
||||
// appended on the Delta Bundle, but HMR needs to have them at the
|
||||
// beginning.
|
||||
modules.unshift({id, code: module.code});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue