(input: string)
| 26 | } |
| 27 | |
| 28 | const isExternal = (input: string) => { |
| 29 | if (!externals) { |
| 30 | return false; |
| 31 | } |
| 32 | for (const e of externals) { |
| 33 | if (typeof e === 'string') { |
| 34 | if (input === e) { |
| 35 | return true; |
| 36 | } |
| 37 | } else if (e instanceof RegExp) { |
| 38 | if (e.test(input)) { |
| 39 | return true; |
| 40 | } |
| 41 | } |
| 42 | } |
| 43 | return false; |
| 44 | }; |
| 45 | |
| 46 | const mapPath = (filePath: string, input: string): string | undefined => { |
| 47 | for (const [k, v] of Object.entries(mapping!)) { |