Skip to content

Commit

Permalink
fix swc_config
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Mar 25, 2024
1 parent bcea19d commit 658393b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/swc_config/src/source_map.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::sync::Arc;

use anyhow::{bail, Context, Result};
use serde::{Deserialize, Serialize};
use sourcemap::{vlq::parse_vlq_segment, RawToken, SourceMap};
Expand All @@ -9,17 +11,19 @@ pub enum SourceMapContent {
#[serde(rename_all = "camelCase")]
Parsed {
#[serde(default)]
sources: Vec<String>,
sources: Vec<Arc<str>>,
#[serde(default)]
names: Vec<String>,
names: Vec<Arc<str>>,
#[serde(default)]
mappings: String,
#[serde(default)]
file: Option<String>,
range_mappings: String,
#[serde(default)]
file: Option<Arc<str>>,
#[serde(default)]
source_root: Option<String>,
#[serde(default)]
sources_content: Option<Vec<Option<String>>>,
sources_content: Option<Vec<Option<Arc<str>>>>,
},
}

Expand All @@ -33,6 +37,7 @@ impl SourceMapContent {
sources,
names,
mappings,
range_mappings: _,
file,
source_root,
sources_content,
Expand Down Expand Up @@ -99,6 +104,7 @@ impl SourceMapContent {
src_col,
src_id: src,
name_id: name,
is_range: false,
});
}
}
Expand Down

0 comments on commit 658393b

Please sign in to comment.