* Resolve a package specifier using the package map. * Returns the package path and subpath, or undefined if resolution should * fall back to standard resolution. * @param {string} specifier - The bare specifier (e.g., "lodash", "react/jsx-runtime") * @param {string} parentPath - File path of th
(specifier, parentPath)
| 298 | * @returns {{packagePath: string, subpath: string}|undefined} |
| 299 | */ |
| 300 | function packageMapResolve(specifier, parentPath) { |
| 301 | const map = getPackageMap(); |
| 302 | assert(map !== null, 'Package map is not enabled'); |
| 303 | return map.resolve(specifier, parentPath); |
| 304 | } |
| 305 | |
| 306 | module.exports = { |
| 307 | hasPackageMap, |
no test coverage detected
searching dependent graphs…