MCPcopy
hub / github.com/rolldown/tsdown / flattenPlugins

Function flattenPlugins

src/features/plugin.ts:72–82  ·  view source on GitHub ↗
(
  plugins: TsdownPluginOption,
)

Source from the content-addressed store, hash-verified

70>
71
72export 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}

Callers 2

plugin.test.tsFile · 0.90
resolveUserConfigFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…