(modulePath)
| 24 | |
| 25 | // Utility to test ESM import functionality |
| 26 | export async function testESMImport (modulePath) { |
| 27 | try { |
| 28 | const module = await import(modulePath) |
| 29 | return { |
| 30 | success: true, |
| 31 | module, |
| 32 | hasDefault: 'default' in module, |
| 33 | namedExports: Object.keys(module).filter(key => key !== 'default') |
| 34 | } |
| 35 | } catch (error) { |
| 36 | return { |
| 37 | success: false, |
| 38 | error: error.message |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | // Performance measurement utilities |
| 44 | export class PerformanceTimer { |