From 445dfce4a89e12e5b6a77f196f2a687bd02bfe6b Mon Sep 17 00:00:00 2001 From: Vendicated Date: Fri, 19 Jul 2024 02:57:11 +0200 Subject: [PATCH] fix css watch --- src/preload.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preload.ts b/src/preload.ts index 7c61a181d..5d9dd180e 100644 --- a/src/preload.ts +++ b/src/preload.ts @@ -19,7 +19,7 @@ import { debounce } from "@shared/debounce"; import { contextBridge, webFrame } from "electron"; import { readFileSync, watch } from "fs"; -import { join } from "path"; +import { dirname, join } from "path"; import VencordNative from "./VencordNative"; @@ -45,7 +45,7 @@ if (location.protocol !== "data:") { if (IS_DEV) { // persistent means keep process running if watcher is the only thing still running // which we obviously don't want - watch(rendererCss, { persistent: false }, () => { + watch(dirname(rendererCss), { persistent: false }, () => { document.getElementById("vencord-css-core")!.textContent = readFileSync(rendererCss, "utf-8"); }); }