Skip to content

Commit 9eed55b

Browse files
committed
refactor: return early in isBuiltIn for resolved modules
1 parent 90fb1da commit 9eed55b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/importType.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ export function isAbsolute(name) {
2323

2424
// path is defined only when a resolver resolves to a non-standard path
2525
export function isBuiltIn(name, settings, path) {
26+
if (path) return false
2627
const base = baseModule(name)
2728
const extras = (settings && settings['import/core-modules']) || []
28-
return !path && coreModules[base] || extras.indexOf(base) > -1
29+
return coreModules[base] || extras.indexOf(base) > -1
2930
}
3031

3132
function isExternalPath(path, name, settings) {

0 commit comments

Comments
 (0)