Skip to content

Commit 4124b09

Browse files
committedNov 4, 2024
fix: allow both tsconfig/jsconfig in same directory
Closes #158
1 parent 9983767 commit 4124b09

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
 

‎src/index.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -331,15 +331,16 @@ export default (opts: PluginOptions = {}): Plugin => {
331331
let path = resolutionCache.get(id)
332332
if (!path) {
333333
path = await resolveId(viteResolve, id, importer)
334-
if (path) {
335-
resolutionCache.set(id, path)
336-
debug(`resolved:`, {
337-
id,
338-
importer,
339-
resolvedId: path,
340-
configPath,
341-
})
334+
if (!path) {
335+
return noMatch
342336
}
337+
resolutionCache.set(id, path)
338+
debug(`resolved:`, {
339+
id,
340+
importer,
341+
resolvedId: path,
342+
configPath,
343+
})
343344
}
344345
return [path && suffix ? path + suffix : path, true]
345346
}
@@ -408,4 +409,3 @@ function compileGlob(glob: string) {
408409
globstar: true,
409410
}).regex
410411
}
411-

0 commit comments

Comments
 (0)
Please sign in to comment.