(p)
| 20 | } |
| 21 | |
| 22 | function tryRemoveQuiet(p) { |
| 23 | if (!fs.existsSync(p)) return; |
| 24 | try { |
| 25 | fs.rmSync(p, { recursive: true, force: true, maxRetries: 5, retryDelay: 250 }); |
| 26 | } catch (_) { |
| 27 | /* locked — build still works via staging */ |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | if (!fs.existsSync(distDir)) { |
| 32 | fs.mkdirSync(distDir, { recursive: true }); |