From 39654bf1e7136077d2db2f85a93591708b4cfe8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Tue, 11 Jun 2024 16:14:01 +0900 Subject: [PATCH] fix(es): Make `output` field optional (#9033) --- crates/swc_compiler_base/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/swc_compiler_base/src/lib.rs b/crates/swc_compiler_base/src/lib.rs index 14291a9d581e..fdb82e773d78 100644 --- a/crates/swc_compiler_base/src/lib.rs +++ b/crates/swc_compiler_base/src/lib.rs @@ -270,7 +270,9 @@ where Ok(TransformOutput { code, map, - output: Some(serde_json::to_string(&output).context("failed to serilaize output")?), + output: output + .map(|v| serde_json::to_string(&v).context("failed to serilaize output")) + .transpose()?, }) }