( file: string, legacyInconsistentCjsInterop: boolean | undefined, packageCache: PackageCache | undefined, isBuild: boolean, )
| 1188 | } |
| 1189 | |
| 1190 | function findNearestPackagePath( |
| 1191 | file: string, |
| 1192 | legacyInconsistentCjsInterop: boolean | undefined, |
| 1193 | packageCache: PackageCache | undefined, |
| 1194 | isBuild: boolean, |
| 1195 | ) { |
| 1196 | if (!isBuild || legacyInconsistentCjsInterop) return |
| 1197 | const pkgData = findNearestPackageData(file, packageCache) |
| 1198 | return pkgData ? path.join(pkgData.dir, 'package.json') : null |
| 1199 | } |
no test coverage detected