diff --git a/lib/commands/build.ts b/lib/commands/build.ts index 8ab88e7672..6acdb2c8f0 100644 --- a/lib/commands/build.ts +++ b/lib/commands/build.ts @@ -18,6 +18,7 @@ export abstract class BuildCommandBase extends ValidatePlatformCommandBase { public dashedOptions = { watch: { type: OptionType.Boolean, default: false, hasSensitiveValue: false }, + hmr: { type: OptionType.Boolean, default: false, hasSensitiveValue: false }, }; public async executeCore(args: string[]): Promise { diff --git a/lib/commands/deploy.ts b/lib/commands/deploy.ts index 739ba5384d..62a35ee7b4 100644 --- a/lib/commands/deploy.ts +++ b/lib/commands/deploy.ts @@ -5,6 +5,10 @@ import { DeployCommandHelper } from "../helpers/deploy-command-helper"; export class DeployOnDeviceCommand extends ValidatePlatformCommandBase implements ICommand { public allowedParameters: ICommandParameter[] = []; + public dashedOptions = { + hmr: { type: OptionType.Boolean, default: false, hasSensitiveValue: false }, + }; + constructor($platformValidationService: IPlatformValidationService, private $platformCommandParameter: ICommandParameter, $options: IOptions, diff --git a/lib/commands/prepare.ts b/lib/commands/prepare.ts index d047cc1d3a..71f6e6fdd3 100644 --- a/lib/commands/prepare.ts +++ b/lib/commands/prepare.ts @@ -7,6 +7,7 @@ export class PrepareCommand extends ValidatePlatformCommandBase implements IComm public dashedOptions = { watch: { type: OptionType.Boolean, default: false, hasSensitiveValue: false }, + hmr: { type: OptionType.Boolean, default: false, hasSensitiveValue: false }, }; constructor($options: IOptions, diff --git a/lib/controllers/deploy-controller.ts b/lib/controllers/deploy-controller.ts index 080d0ad142..78d3aaeff8 100644 --- a/lib/controllers/deploy-controller.ts +++ b/lib/controllers/deploy-controller.ts @@ -11,7 +11,8 @@ export class DeployController { const { liveSyncInfo, deviceDescriptors } = data; const executeAction = async (device: Mobile.IDevice) => { - const buildData = this.$buildDataService.getBuildData(liveSyncInfo.projectDir, device.deviceInfo.platform, liveSyncInfo); + const options = { ...liveSyncInfo, buildForDevice: !device.isEmulator }; + const buildData = this.$buildDataService.getBuildData(liveSyncInfo.projectDir, device.deviceInfo.platform, options); await this.$buildController.prepareAndBuild(buildData); await this.$deviceInstallAppService.installOnDevice(device, buildData); };