require ( "source-map-support/source-map-support.js" ) . install ( ) ; const socketPath = process . env . ELECTRON_HMR_SOCKET_PATH ! ; if ( socketPath == null ) { throw new Error ( `[HMR] Env ELECTRON_HMR_SOCKET_PATH is not set` ) ; } const HmrClient = require ( "electron-webpack/out/electron-main-hmr/HmrClient" ) . HmrClient ; new HmrClient ( socketPath , ( module as any ) . hot , ( ) => { return __webpack_hash__ ; } ) ;