diff --git a/src/rollup/index.ts b/src/rollup/index.ts index a24e1662069..e0480cc68fc 100644 --- a/src/rollup/index.ts +++ b/src/rollup/index.ts @@ -353,7 +353,7 @@ function getSortingFileType(file: OutputAsset | OutputChunk): SortingFileType { function createOutput(outputBundle: Record): RollupOutput { return { - output: Object.keys(outputBundle) + output: <[OutputChunk, ...(OutputChunk | OutputAsset)[]]>Object.keys(outputBundle) .map(fileName => outputBundle[fileName]) .sort((outputFileA, outputFileB) => { const fileTypeA = getSortingFileType(outputFileA);