Skip to content

Commit 7177ad4

Browse files
fix: justlaunch should disable hmr
Currently when `--justlaunch` is passed, CLI still enables the HMR. However, this is not needed, as the `justlaunch` flag by design stops the command after running the application.
1 parent 5ce1cc9 commit 7177ad4

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/options.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ export class Options {
4444
// on each livesync in order to stop and allow debugging on app start
4545
this.argv.hmr = false;
4646
}
47+
48+
if (this.argv.justlaunch) {
49+
this.argv.hmr = false;
50+
}
4751
}
4852

4953
constructor(private $errors: IErrors,

lib/services/livesync/ios-device-livesync-service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,11 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
137137
waitForDebugger: liveSyncInfo.waitForDebugger,
138138
projectDir: projectData.projectDir
139139
});
140-
// enable HOT updates
141-
await this.setupSocketIfNeeded(projectData);
140+
141+
if (liveSyncInfo.useHotModuleReload) {
142+
// enable HOT updates
143+
await this.setupSocketIfNeeded(projectData);
144+
}
142145
}
143146

144147
private async reloadPage(): Promise<void> {

0 commit comments

Comments
 (0)