mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: loader.reloadPlugin: remove first arg
This commit is contained in:
5 files changed
+13
-8
No files matched your search
@@ -103,7 +103,7 @@ export class Loader extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
async reloadPlugin(parent: Context, key: string, config: any, asName = '') {
|
||||
async reloadPlugin(key: string, config: any, asName = '') {
|
||||
let fork = this.state[key];
|
||||
if (fork) {
|
||||
logger.info('reload plugin %c', key.split('node_modules').pop());
|
||||
@@ -115,7 +115,7 @@ export class Loader extends Service {
|
||||
resolveConfig(plugin, config);
|
||||
if (asName) plugin.name = asName;
|
||||
// fork = parent.plugin(plugin, this.interpolate(config));
|
||||
fork = parent.plugin(plugin, config);
|
||||
fork = this.ctx.plugin(plugin, config);
|
||||
if (!fork) return;
|
||||
this.state[key] = fork;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user