( inputs: Record<string, string>, outputDir: string, )
| 23 | } |
| 24 | |
| 25 | async function bundleMultipleWithSourcemap( |
| 26 | inputs: Record<string, string>, |
| 27 | outputDir: string, |
| 28 | ): Promise<OutputChunk[]> { |
| 29 | const bundle = await rollup({ |
| 30 | input: inputs, |
| 31 | plugins: [dts({ sourcemap: true })], |
| 32 | onwarn() {}, |
| 33 | }); |
| 34 | |
| 35 | const result = await bundle.generate({ |
| 36 | format: "es", |
| 37 | sourcemap: true, |
| 38 | dir: outputDir, |
| 39 | }); |
| 40 | |
| 41 | return result.output.filter((o): o is OutputChunk => o.type === "chunk"); |
| 42 | } |
| 43 | |
| 44 | async function bundleWithAssets( |
| 45 | inputs: Record<string, string>, |