()
| 8 | const distClientDir = path.resolve(distDir, 'client') |
| 9 | |
| 10 | function resolveDistServerEntryPath() { |
| 11 | const candidates = [ |
| 12 | path.resolve(distDir, 'server', 'server.js'), |
| 13 | path.resolve(distDir, 'server', 'index.js'), |
| 14 | path.resolve(distDir, 'server', 'index.mjs'), |
| 15 | ] |
| 16 | |
| 17 | return ( |
| 18 | candidates.find((candidate) => fs.existsSync(candidate)) ?? candidates[0] |
| 19 | ) |
| 20 | } |
| 21 | |
| 22 | async function createStartServer() { |
| 23 | const server = (await import(resolveDistServerEntryPath())).default |
no test coverage detected