summaryrefslogtreecommitdiff
path: root/ext/node
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node')
-rw-r--r--ext/node/resolution.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/node/resolution.rs b/ext/node/resolution.rs
index 22ab47ce6..cbe9f643f 100644
--- a/ext/node/resolution.rs
+++ b/ext/node/resolution.rs
@@ -1378,7 +1378,9 @@ fn is_relative_specifier(specifier: &str) -> bool {
/// Alternate `PathBuf::with_extension` that will handle known extensions
/// more intelligently.
fn with_known_extension(path: &Path, ext: &str) -> PathBuf {
- const NON_DECL_EXTS: &[&str] = &["cjs", "js", "json", "jsx", "mjs", "tsx"];
+ const NON_DECL_EXTS: &[&str] = &[
+ "cjs", "js", "json", "jsx", "mjs", "tsx", /* ex. types.d */ "d",
+ ];
const DECL_EXTS: &[&str] = &["cts", "mts", "ts"];
let file_name = match path.file_name() {