From 6644466f2612295ec2b524edbeeeaffda16cea5b Mon Sep 17 00:00:00 2001 From: zouhang <1102639563@qq.com> Date: Thu, 27 Jan 2022 12:56:39 +0800 Subject: [PATCH] fix: filter out illegal sourcemap items (#51) --- src/esbuild/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/esbuild/utils.ts b/src/esbuild/utils.ts index e0752c99..6e6315f3 100644 --- a/src/esbuild/utils.ts +++ b/src/esbuild/utils.ts @@ -62,6 +62,8 @@ export function combineSourcemaps ( filename: string, sourcemapList: Array ): RawSourceMap { + sourcemapList = sourcemapList.filter(m => m.sources) + if ( sourcemapList.length === 0 || sourcemapList.every(m => m.sources.length === 0)