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
5e559f85a0
commit
98411f1642
|
@ -385,7 +385,7 @@ class Bundler {
|
||||||
|
|
||||||
// get entry file complete path (`entryFile` is relative to roots)
|
// get entry file complete path (`entryFile` is relative to roots)
|
||||||
let entryFilePath;
|
let entryFilePath;
|
||||||
if (response.dependencies.length > 0) {
|
if (response.dependencies.length > 1) { // skip HMR requests
|
||||||
const numModuleSystemDependencies =
|
const numModuleSystemDependencies =
|
||||||
this._resolver.getModuleSystemDependencies({dev, unbundle}).length;
|
this._resolver.getModuleSystemDependencies({dev, unbundle}).length;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue