We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2671757 commit a4dc76cCopy full SHA for a4dc76c
src/index.ts
@@ -119,6 +119,8 @@ let previousOptionsHash: string
119
let optionsHash: string
120
let cachedOptions: InternalResolverOptions | undefined
121
122
+let prevCwd: string
123
+
124
let mappersCachedOptions: InternalResolverOptions
125
let mappers: Array<((specifier: string) => string[]) | null> | undefined
126
@@ -347,9 +349,14 @@ function getMappedPath(
347
349
}
348
350
351
function initMappers(options: InternalResolverOptions) {
- if (mappers && mappersCachedOptions === options) {
352
+ if (
353
+ mappers &&
354
+ mappersCachedOptions === options &&
355
+ prevCwd === process.cwd()
356
+ ) {
357
return
358
359
+ prevCwd = process.cwd()
360
361
const configPaths =
362
typeof options.project === 'string'
0 commit comments