Skip to content

Commit c025403

Browse files
committed
1 parent 19902fb commit c025403

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1453,6 +1453,9 @@ impl<Fs: FileSystem> ResolverGeneric<Fs> {
14531453
specifier: &str,
14541454
ctx: &mut Ctx,
14551455
) -> ResolveResult {
1456+
if cached_path.inside_node_modules() {
1457+
return Ok(None);
1458+
}
14561459
let Some(tsconfig_options) = &self.options.tsconfig else {
14571460
return Ok(None);
14581461
};

src/tests/tsconfig_paths.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn tsconfig_resolve() {
4545

4646
#[rustfmt::skip]
4747
let data = [
48-
(f.join("node_modules/tsconfig-not-used"), "ts-path", Ok(f.join("src/foo.js"))),
48+
(f.join("node_modules/tsconfig-not-used"), "ts-path", Err(ResolveError::NotFound("ts-path".to_string()))),
4949
];
5050

5151
let resolver = Resolver::new(ResolveOptions {

0 commit comments

Comments
 (0)