(server)
| 11 | { |
| 12 | name: 'backend-watch-reload', |
| 13 | configureServer(server) { |
| 14 | const watcher = chokidar.watch('../api', { |
| 15 | persistent: true, |
| 16 | ignored: (file, stats) => !!stats?.isFile() && !file.endsWith('.mts'), |
| 17 | }); |
| 18 | watcher.on('change', () => { |
| 19 | server.ws.send({ |
| 20 | type: 'full-reload', |
| 21 | }); |
| 22 | }); |
| 23 | }, |
| 24 | }, |
| 25 | ], |
| 26 |