refactor: trigger application reload by appending to entry file instead of updating its times.

This commit is contained in:
syntaxbullet
2025-12-15 22:38:32 +01:00
parent d2edde77e6
commit 727b63b4dc

View File

@@ -48,8 +48,8 @@ export const reload = createCommand({
}));
// Trigger restart by touching entry point
const now = new Date();
await utimes("src/index.ts", now, now);
const { appendFile } = await import("fs/promises");
await appendFile("src/index.ts", " ");
} catch (error) {
console.error(error);