From f3703d985d3159bfc30a640973450814b8d71bd7 Mon Sep 17 00:00:00 2001 From: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com> Date: Tue, 10 Sep 2024 22:18:34 +0200 Subject: [PATCH] fix: node builtin detection --- src/isIgnorableSpecifier.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/isIgnorableSpecifier.ts b/src/isIgnorableSpecifier.ts index 70efee9..9763e9e 100644 --- a/src/isIgnorableSpecifier.ts +++ b/src/isIgnorableSpecifier.ts @@ -1,3 +1,4 @@ +import { isBuiltin } from 'node:module'; import { dirname, extname, @@ -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);