( plugins: TsdownPluginOption, )
| 70 | > |
| 71 | |
| 72 | export async function flattenPlugins( |
| 73 | plugins: TsdownPluginOption, |
| 74 | ): Promise<TsdownPlugin[]> { |
| 75 | const awaited = await plugins |
| 76 | if (!awaited) return [] |
| 77 | if (Array.isArray(awaited)) { |
| 78 | const nested = await Promise.all(awaited.map(flattenPlugins)) |
| 79 | return nested.flat() |
| 80 | } |
| 81 | return [awaited as TsdownPlugin] |
| 82 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…