Move unloadModule to RenderHost
Summary: Define unload module on RenderHost. Not sure how to do that the browser and not sure how meaning full it is in a browser context. Reviewed By: nikoant Differential Revision: D32827050 fbshipit-source-id: 87025c6f5c2b950880712bff8df1c92a044a222e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6c7a139554
commit
d0402d7268
@@ -195,6 +195,13 @@ export function initializeElectron(
|
||||
!flipperServerConfig.environmentInfo.isProduction,
|
||||
);
|
||||
},
|
||||
unloadModule(path: string) {
|
||||
const resolvedPath = global.electronRequire.resolve(path);
|
||||
if (!resolvedPath || !global.electronRequire.cache[resolvedPath]) {
|
||||
return;
|
||||
}
|
||||
delete global.electronRequire.cache[resolvedPath];
|
||||
},
|
||||
} as RenderHost;
|
||||
|
||||
setupMenuBar();
|
||||
|
||||
Reference in New Issue
Block a user