Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

Commit f3703d9

Browse files
fix: node builtin detection
1 parent ec05307 commit f3703d9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/isIgnorableSpecifier.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isBuiltin } from 'node:module';
12
import {
23
dirname,
34
extname,
@@ -13,7 +14,7 @@ export function isIgnorableSpecifier(
1314
parentPath: FSAbsolutePath,
1415
specifier: string,
1516
) {
16-
if (specifier.startsWith('node:')) return true;
17+
if (isBuiltin(specifier)) return true;
1718
if (specifier.startsWith('data:')) return true;
1819

1920
const ext = extname(specifier);

0 commit comments

Comments
 (0)