mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: export metrics with tx2
This commit is contained in:
1 parent
14df7d7a05
commit
7f25778671
5 files changed
+21
-9
No files matched your search
@@ -34,16 +34,17 @@ export function addon(addonPath: string, prepend = false) {
|
||||
global.publicDirs[prepend ? 'push' : 'unshift'](publicPath);
|
||||
const targets = fs.readdirSync(publicPath);
|
||||
for (const target of targets) {
|
||||
if (global.ui.manifest[target] && !prepend) {
|
||||
global.ui.manifest[target] = publicPath;
|
||||
} else if (!global.staticFiles[target]) {
|
||||
global.ui.manifest[target] = publicPath;
|
||||
if (global.Hydro.ui.manifest[target] && !prepend) {
|
||||
global.Hydro.ui.manifest[target] = publicPath;
|
||||
} else if (!global.Hydro.ui.manifest[target]) {
|
||||
global.Hydro.ui.manifest[target] = publicPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
global.addons[prepend ? 'unshift' : 'push'](modulePath);
|
||||
} catch (e) {
|
||||
logger.error(`Addon not found: ${addonPath}`);
|
||||
logger.error(e);
|
||||
}
|
||||
} else logger.error(`Addon not found: ${addonPath}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user