feat(plugin): support dynamic plugin load / unload

This commit is contained in:
Su-Yong
2023-11-12 01:16:34 +09:00
parent 9c59f56aac
commit 2097f42efb
8 changed files with 87 additions and 15 deletions

View File

@ -37,7 +37,7 @@ const createContext = <
},
});
const forceUnloadMainPlugin = (id: keyof PluginBuilderList, win: BrowserWindow) => {
export const forceUnloadMainPlugin = (id: keyof PluginBuilderList, win: BrowserWindow) => {
unregisterStyleMap[id]?.forEach((unregister) => unregister());
delete unregisterStyleMap[id];

View File

@ -24,7 +24,7 @@ const createContext = <
},
});
const forceUnloadPreloadPlugin = (id: keyof PluginBuilderList) => {
export const forceUnloadPreloadPlugin = (id: keyof PluginBuilderList) => {
unregisterStyleMap[id]?.forEach((unregister) => unregister());
delete unregisterStyleMap[id];

View File

@ -31,7 +31,7 @@ const createContext = <
},
});
const forceUnloadRendererPlugin = (id: keyof PluginBuilderList) => {
export const forceUnloadRendererPlugin = (id: keyof PluginBuilderList) => {
unregisterStyleMap[id]?.forEach((unregister) => unregister());
delete unregisterStyleMap[id];