( modulePath: string, )
| 39 | * Create import.meta object for Node.js. |
| 40 | */ |
| 41 | export function createNodeImportMeta( |
| 42 | modulePath: string, |
| 43 | ): ModuleRunnerImportMeta { |
| 44 | const defaultMeta = createDefaultImportMeta(modulePath) |
| 45 | const href = defaultMeta.url |
| 46 | |
| 47 | const importMetaResolver = createImportMetaResolver() |
| 48 | |
| 49 | return { |
| 50 | ...defaultMeta, |
| 51 | main: false, |
| 52 | resolve(id: string, parent?: string) { |
| 53 | const resolver = importMetaResolver ?? defaultMeta.resolve |
| 54 | return resolver(id, parent ?? href) |
| 55 | }, |
| 56 | } |
| 57 | } |
nothing calls this directly
no test coverage detected