(id: string)
| 554 | |
| 555 | // https://github.com/rolldown/rolldown/blob/bf53a100edf1780d5a5aa41f0bc0459c5696543e/crates/rolldown/src/utils/load_source.rs#L53-L89 |
| 556 | export function getModuleTypeFromId(id: string): ModuleType | undefined { |
| 557 | let pos = -1 |
| 558 | while ((pos = id.indexOf('.', pos + 1)) >= 0) { |
| 559 | const ext = id.slice(pos + 1) |
| 560 | const moduleType = defaultModuleTypes[ext] |
| 561 | if (moduleType) { |
| 562 | return moduleType |
| 563 | } |
| 564 | } |
| 565 | } |
no outgoing calls
no test coverage detected