()
| 85 | hmr: { logger: false }, |
| 86 | }) |
| 87 | const importWithRetry = async () => { |
| 88 | try { |
| 89 | return await runner.import(entry) |
| 90 | } catch (e) { |
| 91 | if ( |
| 92 | e instanceof Error && |
| 93 | (e as any).code === 'ERR_OUTDATED_OPTIMIZED_DEP' |
| 94 | ) { |
| 95 | runner.clearCache() |
| 96 | return await importWithRetry() |
| 97 | } |
| 98 | throw e |
| 99 | } |
| 100 | } |
| 101 | const handler: Connect.NextHandleFunction = async (req, res, next) => { |
| 102 | try { |
| 103 | const mod = await importWithRetry() |
no test coverage detected