mirror of https://github.com/status-im/metro.git
Make HMR compatible with numeric IDs
Summary:We recently refactor the packager to transform the module names into numeric IDs but we forgot to update the HMR call site. As a consequence, HMR doesn't work the first time a file is saved but the second one. This is affecting master as of 3/20. If we don't land this before v0.23 is cut we'll have to cherry pick it. This rev does *not* need to be picked on v0.22. Reviewed By: bestander Differential Revision: D3075192 fb-gh-sync-id: 410e4bf8f937c0cdb8f2b462dd36f928a24e8aa8 shipit-source-id: 410e4bf8f937c0cdb8f2b462dd36f928a24e8aa8
This commit is contained in:
parent
abbc1a5157
commit
ebfb4f738a
|
@ -34,10 +34,10 @@ class HMRBundle extends BundleBase {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
getModulesNamesAndCode() {
|
||||
getModulesIdsAndCode() {
|
||||
return this._modules.map(module => {
|
||||
return {
|
||||
name: JSON.stringify(module.name),
|
||||
id: JSON.stringify(module.id),
|
||||
code: module.code,
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue