diff options
author | Marvin Hagemeister <hello@marvinh.dev> | 2023-04-06 16:12:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-06 16:12:50 +0200 |
commit | e51985ca749d80d40474489c739cf163b35843e1 (patch) | |
tree | 8c0e7e240540a0cca52f5dde88753895d09a2363 /ext/node/ops.rs | |
parent | 4cc8784f5b3a71b2a882ff359d593b4b74c9e89b (diff) |
fix(ext/node): fix unable to resolve fraction.js (#18544)
Turns out `autoprefixer` is a better reproduction case then
`microbundle`.
Fixes #18535
Fixes #18600
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'ext/node/ops.rs')
-rw-r--r-- | ext/node/ops.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/node/ops.rs b/ext/node/ops.rs index 456c0dd51..77d148383 100644 --- a/ext/node/ops.rs +++ b/ext/node/ops.rs @@ -470,7 +470,13 @@ where { modules_path } else { - path_resolve(vec![modules_path, name]) + let orignal = modules_path.clone(); + let mod_dir = path_resolve(vec![modules_path, name]); + if Env::Fs::is_dir(&mod_dir) { + mod_dir + } else { + orignal + } }; let pkg = PackageJson::load::<Env::Fs>( &*resolver, |