(x, path, extList)
| 181 | } |
| 182 | |
| 183 | customResolve(x, path, extList) { |
| 184 | if (this.customResolver === undefined) return undefined; |
| 185 | if (!(this.pathIsAbsolute(x) || this.pathIsRelative(x))) { |
| 186 | if (!this.externalCache.some(regex => regex.test(x))) return undefined; |
| 187 | } |
| 188 | const resolved = this.customResolver(x, path); |
| 189 | if (!resolved) return undefined; |
| 190 | if (typeof resolved === 'string') { |
| 191 | this.externals.push(new RegExp('^' + escapeRegExp(resolved))); |
| 192 | return this.loadAsFileOrDirectory(resolved, extList); |
| 193 | } |
| 194 | const {module=x, path: resolvedPath} = resolved; |
| 195 | this.externals.push(new RegExp('^' + escapeRegExp(resolvedPath))); |
| 196 | return this.loadNodeModules(module, [resolvedPath], extList); |
| 197 | } |
| 198 | |
| 199 | } |
| 200 |
nothing calls this directly
no test coverage detected