We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9983767 commit 4124b09Copy full SHA for 4124b09
src/index.ts
@@ -331,15 +331,16 @@ export default (opts: PluginOptions = {}): Plugin => {
331
let path = resolutionCache.get(id)
332
if (!path) {
333
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
- })
+ if (!path) {
+ return noMatch
342
}
+ resolutionCache.set(id, path)
+ debug(`resolved:`, {
+ id,
+ importer,
+ resolvedId: path,
+ configPath,
343
+ })
344
345
return [path && suffix ? path + suffix : path, true]
346
@@ -408,4 +409,3 @@ function compileGlob(glob: string) {
408
409
globstar: true,
410
}).regex
411
-
0 commit comments