Skip to content

Commit fcdb969

Browse files
committed
fix: provide platform when emitting webpack_compilation_ready event
Providing platform on webpack_compilation_ready event will give us the ability to transfer android specific hmr files only on android devices and iOS specific hmr files only on iOS devices
1 parent 6d274fe commit fcdb969

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/controllers/prepare-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class PrepareController extends EventEmitter {
102102
private async startJSWatcherWithPrepare(platformData: IPlatformData, projectData: IProjectData, prepareData: IPrepareData): Promise<void> {
103103
if (!this.watchersData[projectData.projectDir][platformData.platformNameLowerCase].webpackCompilerProcess) {
104104
this.$webpackCompilerService.on(WEBPACK_COMPILATION_COMPLETE, data => {
105-
this.emitPrepareEvent({ ...data, hasNativeChanges: false, platform: platformData.platformNameLowerCase });
105+
this.emitPrepareEvent({ ...data, hasNativeChanges: false });
106106
});
107107

108108
const childProcess = await this.$webpackCompilerService.compileWithWatch(platformData, projectData, prepareData);

lib/services/webpack/webpack-compiler-service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export class WebpackCompilerService extends EventEmitter implements IWebpackComp
6060
hmrData: {
6161
hash: result.hash,
6262
fallbackFiles
63-
}
63+
},
64+
platform: platformData.platformNameLowerCase
6465
};
6566

6667
if (data.files.length) {

0 commit comments

Comments
 (0)