Skip to content

Commit

Permalink
fix(resolver): ensure we always pass an absolute path to oxc_resolver (
Browse files Browse the repository at this point in the history
  • Loading branch information
camc314 authored Jun 26, 2024
1 parent ef07df1 commit 3ffe43f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crates/rolldown_resolver/src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ impl<F: FileSystem + Default> Resolver<F> {
};

let resolve_options_with_default_conditions = OxcResolverOptions {
tsconfig: raw_resolve.tsconfig_filename.map(|p| TsconfigOptions {
config_file: p.into(),
references: oxc_resolver::TsconfigReferences::Disabled,
tsconfig: raw_resolve.tsconfig_filename.map(|p| {
let path = PathBuf::from(&p);
TsconfigOptions {
config_file: if path.is_relative() { cwd.join(path) } else { path },
references: oxc_resolver::TsconfigReferences::Disabled,
}
}),
alias: raw_resolve
.alias
Expand Down

0 comments on commit 3ffe43f

Please sign in to comment.