refactor: trigger application reload by appending to entry file instead of updating its times.
This commit is contained in:
@@ -48,8 +48,8 @@ export const reload = createCommand({
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
// Trigger restart by touching entry point
|
// Trigger restart by touching entry point
|
||||||
const now = new Date();
|
const { appendFile } = await import("fs/promises");
|
||||||
await utimes("src/index.ts", now, now);
|
await appendFile("src/index.ts", " ");
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user