Skip to content

Commit

Permalink
fix: node builtin detection
Browse files Browse the repository at this point in the history
  • Loading branch information
JakobJingleheimer committed Sep 10, 2024
1 parent ec05307 commit f3703d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/isIgnorableSpecifier.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { isBuiltin } from 'node:module';
import {
dirname,
extname,
Expand All @@ -13,7 +14,7 @@ export function isIgnorableSpecifier(
parentPath: FSAbsolutePath,
specifier: string,
) {
if (specifier.startsWith('node:')) return true;
if (isBuiltin(specifier)) return true;
if (specifier.startsWith('data:')) return true;

const ext = extname(specifier);
Expand Down

0 comments on commit f3703d9

Please sign in to comment.