From 0ec6b470828e971cb09c142a0af8f0550ca3f7bd Mon Sep 17 00:00:00 2001 From: fatme Date: Fri, 12 Oct 2018 13:27:17 +0300 Subject: [PATCH] fix: send hmr status per platform when more than one webpack processes are stated --- lib/compiler.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/compiler.js b/lib/compiler.js index 7d79e628..eeb1515c 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -82,9 +82,11 @@ exports.runWebpackCompiler = function runWebpackCompiler(config, $projectData, $ const result = getUpdatedEmittedFiles(message.emittedFiles); - if (hookArgs.hmrData && hookArgs.hmrData.fallbackFiles) { - hookArgs.hmrData.fallbackFiles[platform] = result.fallbackFiles; - hookArgs.hmrData.hash = result.hash || ""; + if (hookArgs.hmrData) { + hookArgs.hmrData[platform] = { + hash: result.hash || "", + fallbackFiles: result.fallbackFiles + }; } if (hookArgs.filesToSyncMap && hookArgs.startSyncFilesTimeout) {