Skip to content

Commit

Permalink
don't use asar in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vendicated committed Jul 19, 2024
1 parent d48f52e commit 090a9f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/build/build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ if (existsSync("dist/renderer.js")) {
);

await Promise.all([
writeFile("dist/patcher.js", 'require("./desktop.asar")'),
writeFile("dist/vencordDesktopMain.js", 'require("./vesktop.asar")')
writeFile("dist/patcher.js", 'require("./desktop")'),
writeFile("dist/vencordDesktopMain.js", 'require("./vesktop")')
]);
}
2 changes: 1 addition & 1 deletion scripts/runInstaller.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ try {
env: {
...process.env,
VENCORD_USER_DATA_DIR: BASE_DIR,
VENCORD_ASAR_FILE: join(BASE_DIR, "dist/desktop.asar"),
VENCORD_DIRECTORY: join(BASE_DIR, "dist/desktop"),
VENCORD_DEV_INSTALL: "1"
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import { debounce } from "@shared/debounce";
import { contextBridge, webFrame } from "electron";
import { readFileSync, watch } from "fs";
import { dirname, join } from "path";
import { join } from "path";

import VencordNative from "./VencordNative";

Expand All @@ -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(dirname(rendererCss), { persistent: false }, () => {
watch(rendererCss, { persistent: false }, () => {
document.getElementById("vencord-css-core")!.textContent = readFileSync(rendererCss, "utf-8");
});
}
Expand Down

0 comments on commit 090a9f5

Please sign in to comment.