mirror of https://github.com/status-im/metro.git
Avoid getting `entryFilePath` on HMR codepath
Summary: The HMR codepath is currently broken because of a recent change that tries to compute the absolute entryFile path (needed for RAM Bundling). HMR Bundler's bundles are special as they contains a single file (the file that was transformed). However, for performance reasons we recycle an existing resolution response which contains the polyfills and the module system modules. Reviewed By: sam-swarr Differential Revision: D3098069 fb-gh-sync-id: 23d61aa304cd6f59d4df4840965f5eedda05dc31 fbshipit-source-id: 23d61aa304cd6f59d4df4840965f5eedda05dc31
This commit is contained in:
parent
7cf1c7f51f
commit
97e1db3e6c
|
@ -385,7 +385,7 @@ class Bundler {
|
|||
|
||||
// get entry file complete path (`entryFile` is relative to roots)
|
||||
let entryFilePath;
|
||||
if (response.dependencies.length > 0) {
|
||||
if (response.dependencies.length > 1) { // skip HMR requests
|
||||
const numModuleSystemDependencies =
|
||||
this._resolver.getModuleSystemDependencies({dev, unbundle}).length;
|
||||
|
||||
|
|
Loading…
Reference in New Issue