( format: InternalModuleFormat, isWorker: boolean, )
| 1665 | } |
| 1666 | |
| 1667 | export function createToImportMetaURLBasedRelativeRuntime( |
| 1668 | format: InternalModuleFormat, |
| 1669 | isWorker: boolean, |
| 1670 | ): (filename: string, importer: string) => { runtime: string } { |
| 1671 | const formatLong = isWorker && format === 'iife' ? 'worker-iife' : format |
| 1672 | const toRelativePath = customRelativeUrlMechanisms[formatLong] |
| 1673 | return (filename, importer) => ({ |
| 1674 | runtime: toRelativePath( |
| 1675 | path.posix.relative(path.dirname(importer), filename), |
| 1676 | ), |
| 1677 | }) |
| 1678 | } |
| 1679 | |
| 1680 | export function toOutputFilePathWithoutRuntime( |
| 1681 | filename: string, |
no test coverage detected