From 9abc0e4728aeaf1b56dd1a48607389087a1581c7 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 22 Jan 2026 22:50:57 -0600 Subject: [PATCH] Switch from JSON5 to standard JSON for sourcemaps to ensure compatibility with external tools like LSPs --- src/cli/sourcemap.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli/sourcemap.rs b/src/cli/sourcemap.rs index 88a1ce25..1a4f9500 100644 --- a/src/cli/sourcemap.rs +++ b/src/cli/sourcemap.rs @@ -239,13 +239,15 @@ fn write_sourcemap( if let Some(output_path) = output { let mut file = BufWriter::new(File::create(output_path)?); - let json_output = json5::to_string(&root_node)?; + // Use standard JSON (not JSON5) for sourcemaps - required by external tools like LSPs + let json_output = serde_json::to_string(&root_node)?; file.write_all(json_output.as_bytes())?; file.flush()?; println!("Created sourcemap at {}", output_path.display()); } else { - let output = json5::to_string(&root_node)?; + // Use standard JSON (not JSON5) for sourcemaps - required by external tools like LSPs + let output = serde_json::to_string(&root_node)?; println!("{}", output); }