diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-03-08 14:14:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-08 14:14:28 -0500 |
commit | fee4943f760fae2c9386ceeda86c3f8fbfd8e6a0 (patch) | |
tree | 1328aa7ed36a7c47f78135dd5da4bcc83662de30 /ext/node/resolution.rs | |
parent | 8fdc376b4a3a383a3ae2fe29c6cc5ab821e5ec86 (diff) |
fix(node): resolve .css files in npm packages when type checking (#22804)
When type checking, we should just resolve css files in npm packages and
not surface a type checking error on the specifier.
Diffstat (limited to 'ext/node/resolution.rs')
-rw-r--r-- | ext/node/resolution.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/node/resolution.rs b/ext/node/resolution.rs index 6f7b8c921..4590311e8 100644 --- a/ext/node/resolution.rs +++ b/ext/node/resolution.rs @@ -518,6 +518,10 @@ impl NodeResolver { return Some(path); } } + // allow resolving .css files for types resolution + if lowercase_path.ends_with(".css") { + return Some(path); + } None } |