diff --git a/src/index.ts b/src/index.ts index bcc53c17f..13bcea067 100755 --- a/src/index.ts +++ b/src/index.ts @@ -85,19 +85,16 @@ async function getInputs( entries?: string | string[], source?: string ): Promise { - let inputs: string[] = []; - let stub: any[] = []; - stub - .concat( - entries && entries.length - ? entries - : (source && resolveApp(source)) || - ((await isDir(resolveApp('src'))) && (await jsOrTs('src/index'))) - ) - .map(file => glob(file)) - .forEach(input => inputs.push(input)); - - return concatAllArray(inputs); + return concatAllArray( + ([] as any[]) + .concat( + entries && entries.length + ? entries + : (source && resolveApp(source)) || + ((await isDir(resolveApp('src'))) && (await jsOrTs('src/index'))) + ) + .map(file => glob(file)) + ); } prog