This commit is contained in:
xiaojunnuo
2026-01-08 00:31:18 +08:00
parent dae87e26a3
commit 1df3967889
5 changed files with 6 additions and 224 deletions
@@ -18,10 +18,12 @@ export class AutoBLoadPlugins {
}else{
// await import("../../plugins/index.js")
const fs = await import("fs");
const list = fs.readdirSync("../../plugins");
const list = fs.readdirSync("./dist/plugins");
console.log("list", list);
for (const file of list) {
if (file.endsWith("index.js")) {
await import(`../../plugins/${file}`);
if (!file.includes(".")){
logger.info(`加载插件文件:${file}`);
await import(`../../plugins/${file}/index.js`);
}
}
}