From 98411f1642715bc678661403f9421ce18f6f5347 Mon Sep 17 00:00:00 2001 From: Mart?n Bigio Date: Fri, 25 Mar 2016 08:44:38 -0700 Subject: [PATCH] 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 --- packager/react-packager/src/Bundler/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packager/react-packager/src/Bundler/index.js b/packager/react-packager/src/Bundler/index.js index 52bb3ad27..2fd484c0b 100644 --- a/packager/react-packager/src/Bundler/index.js +++ b/packager/react-packager/src/Bundler/index.js @@ -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;