* Produces an alias map with paths relative to the provided root. * @param {string} rootDir * @param {'preact' | 'react'} buildFor * @return {!{[key: string]: string}}
(rootDir, buildFor = 'preact')
| 85 | * @return {!{[key: string]: string}} |
| 86 | */ |
| 87 | function getRelativeAliasMap(rootDir, buildFor = 'preact') { |
| 88 | return Object.fromEntries( |
| 89 | Object.entries(getImportResolver(buildFor).alias).map( |
| 90 | ([alias, destPath]) => [alias, path.join(rootDir, destPath)] |
| 91 | ) |
| 92 | ); |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Import resolver Babel plugin configuration. |
no test coverage detected