fix css watch

This commit is contained in:
Vendicated 2024-07-19 02:57:11 +02:00
parent 65e91cf22e
commit 445dfce4a8
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -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");
});
}