From 43b68a864d718358817de2bc72a118317642783d Mon Sep 17 00:00:00 2001 From: Mikhail Date: Tue, 19 Sep 2023 12:56:04 +0300 Subject: [PATCH] Optimize findManifestDependencies (#247) * Optimize findManifestDependencies * Fix return --- src/manifest/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest/index.ts b/src/manifest/index.ts index d525d94bc..5f6f91100 100644 --- a/src/manifest/index.ts +++ b/src/manifest/index.ts @@ -18,7 +18,7 @@ const findManifestDependencies = async ({ manifest, isProduction, isStrict, dir, const scripts = Object.entries(manifest.scripts ?? {}).reduce((scripts, [scriptName, script]) => { if (script && (scriptFilter.length === 0 || scriptFilter.includes(scriptName))) { - return [...scripts, script]; + scripts.push(script); } return scripts; }, [] as string[]);