mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: bug fixes
This commit is contained in:
1 parent
5d340608db
commit
2daa7e2034
11 files changed
+36
-34
No files matched your search
@@ -54,12 +54,12 @@ export class Loader {
|
||||
async reloadPlugin(parent: Context, key: string, config: any, asName = '') {
|
||||
let fork = parent.state[Loader.Record]?.[key];
|
||||
if (fork) {
|
||||
logger.info('reload plugin %c', key);
|
||||
logger.info('reload plugin %c', key.split('node_modules').pop());
|
||||
fork.update(config);
|
||||
} else {
|
||||
logger.info('apply plugin %c', key);
|
||||
logger.info('apply plugin %c', key.split('node_modules').pop());
|
||||
const plugin = await this.resolvePlugin(key);
|
||||
if (!plugin) return;
|
||||
if (!plugin) return;
|
||||
resolveConfig(plugin, config);
|
||||
if (asName) plugin.name = asName;
|
||||
// fork = parent.plugin(plugin, this.interpolate(config));
|
||||
|
||||
Reference in new issue
Block a user