fix: #1574 & Clear CJS cache and reload plugins on install
Add support for clearing CommonJS module cache when unloading plugins and reload plugins on install. PluginLoader now uses createRequire to access require.cache and exposes clearCache(pluginPath) to remove cached modules under the plugin directory; plugin manager calls this when unloading. Web UI backend install handlers now reload an existing plugin (with progress updates) instead of skipping registration, ensuring updated code/metadata take effect.
This commit is contained in:
1 parent
d4fee6798c
commit
5fac30afd8
3 files changed
+36
-6
No files matched your search
@@ -179,6 +179,9 @@ export class OB11PluginMangerAdapter extends IOB11NetworkAdapter<PluginConfig> i
|
||||
this.pluginRouters.delete(entry.id);
|
||||
}
|
||||
|
||||
// 清理模块缓存
|
||||
this.loader.clearCache(entry.pluginPath);
|
||||
|
||||
// 重置状态
|
||||
entry.loaded = false;
|
||||
entry.runtime = {
|
||||
|
||||
Reference in new issue
Block a user