Skip to content

Commit 56085d1

Browse files
mischnictimneutkens
authored andcommitted
span for minify
1 parent bcb4449 commit 56085d1

File tree

1 file changed

+2
-2
lines changed
  • turbopack/crates/turbopack-ecmascript/src

1 file changed

+2
-2
lines changed

turbopack/crates/turbopack-ecmascript/src/minify.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{io::Write, sync::Arc};
1+
use std::{borrow::Cow, io::Write, sync::Arc};
22

33
use anyhow::{bail, Context, Result};
44
use swc_core::{
@@ -33,7 +33,7 @@ pub fn minify(path: &FileSystemPath, code: &Code, source_maps: bool, mangle: boo
3333
let (src, mut src_map_buf) = {
3434
let fm = cm.new_source_file(
3535
FileName::Custom(path.path.to_string()).into(),
36-
code.source_code().to_str()?.into_owned(),
36+
code_str.into_owned(),
3737
);
3838

3939
let lexer = Lexer::new(

0 commit comments

Comments
 (0)