From 008f76e44075dda4185b5057aff8827bd66bda7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Mon, 11 Mar 2024 11:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugins/loader.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js index 38ff303..08884f2 100644 --- a/lib/plugins/loader.js +++ b/lib/plugins/loader.js @@ -89,10 +89,9 @@ class PluginsLoader { this.pluginCount = 0 const packageErr = [] - const pluginArray = [] - for (const file of files) - pluginArray.push(this.importPlugin(file, packageErr)) - await Promise.allSettled(pluginArray) + await Promise.allSettled(files.map(file => + this.importPlugin(file, packageErr) + )) this.packageTips(packageErr) this.creatTask()