Skip to content

Commit

Permalink
fix(es): Remove import statement canonicalization (#6716)
Browse files Browse the repository at this point in the history
  • Loading branch information
realtimetodie committed Dec 27, 2022
1 parent 641e03c commit b451fa9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/swc/src/config/mod.rs
Expand Up @@ -1309,10 +1309,10 @@ impl ModuleConfig {
available_features: FeatureFlag,
) -> Box<dyn swc_ecma_visit::Fold + 'cmt> {
let base = match base {
FileName::Real(v) if !paths.is_empty() => {
FileName::Real(v.canonicalize().unwrap_or_else(|_| v.to_path_buf()))
FileName::Real(path) if !paths.is_empty() && !path.is_absolute() => {
FileName::Real(std::env::current_dir().unwrap().join(path))
}
_ => base.clone(),
_ => base.to_owned(),
};

match config {
Expand Down

0 comments on commit b451fa9

Please sign in to comment.