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:
Mart?n Bigio 2016-03-25 08:44:38 -07:00 committed by Facebook Github Bot 4
parent 5e559f85a0
commit 98411f1642
1 changed files with 1 additions and 1 deletions

View File

@ -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;