File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
commonjs-extension-resolution-loader Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
- import { builtinModules } from 'node:module' ;
2
- import { dirname } from 'path' ;
3
- import { cwd } from 'process' ;
4
- import { fileURLToPath , pathToFileURL } from 'url' ;
5
- import { promisify } from 'util' ;
1
+ import { isBuiltin } from 'node:module' ;
2
+ import { dirname } from 'node: path' ;
3
+ import { cwd } from 'node: process' ;
4
+ import { fileURLToPath , pathToFileURL } from 'node: url' ;
5
+ import { promisify } from 'node: util' ;
6
6
7
7
import resolveCallback from 'resolve/async.js' ;
8
8
@@ -14,7 +14,7 @@ const baseURL = pathToFileURL(cwd() + '/').href;
14
14
export async function resolve ( specifier , context , next ) {
15
15
const { parentURL = baseURL } = context ;
16
16
17
- if ( specifier . startsWith ( 'node:' ) || builtinModules . includes ( specifier ) ) {
17
+ if ( isBuiltin ( specifier ) ) {
18
18
return next ( specifier , context ) ;
19
19
}
20
20
You can’t perform that action at this time.
0 commit comments