From 1716a883bd141dafaf3df1deb2e143edae40b5bf Mon Sep 17 00:00:00 2001 From: DimitarTachev Date: Fri, 14 Sep 2018 11:00:59 +0300 Subject: [PATCH] fix: read the hmr option from the preview command --- lib/before-preview-sync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/before-preview-sync.js b/lib/before-preview-sync.js index f2f221c2..81fb603b 100644 --- a/lib/before-preview-sync.js +++ b/lib/before-preview-sync.js @@ -1,10 +1,11 @@ const { runWebpackCompiler } = require("./compiler"); -module.exports = function($logger, $liveSyncService, hookArgs) { +module.exports = function($logger, $liveSyncService, $options, hookArgs) { const { config } = hookArgs; const bundle = config && config.appFilesUpdaterOptions && config.appFilesUpdaterOptions.bundle; if (bundle) { const env = config.env || {}; + env.hmr = !!$options.hmr; const platform = config.platform; const release = config && config.appFilesUpdaterOptions && config.appFilesUpdaterOptions.release; const compilerConfig = {