Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit 0ec6b47

Browse files
committed
fix: send hmr status per platform when more than one webpack processes are stated
1 parent f627a02 commit 0ec6b47

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/compiler.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,11 @@ exports.runWebpackCompiler = function runWebpackCompiler(config, $projectData, $
8282

8383
const result = getUpdatedEmittedFiles(message.emittedFiles);
8484

85-
if (hookArgs.hmrData && hookArgs.hmrData.fallbackFiles) {
86-
hookArgs.hmrData.fallbackFiles[platform] = result.fallbackFiles;
87-
hookArgs.hmrData.hash = result.hash || "";
85+
if (hookArgs.hmrData) {
86+
hookArgs.hmrData[platform] = {
87+
hash: result.hash || "",
88+
fallbackFiles: result.fallbackFiles
89+
};
8890
}
8991

9092
if (hookArgs.filesToSyncMap && hookArgs.startSyncFilesTimeout) {

0 commit comments

Comments
 (0)