don't use asar in dev
This commit is contained in:
parent
d48f52e8c3
commit
090a9f5caf
|
@ -231,7 +231,7 @@ if (existsSync("dist/renderer.js")) {
|
||||||
);
|
);
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
writeFile("dist/patcher.js", 'require("./desktop.asar")'),
|
writeFile("dist/patcher.js", 'require("./desktop")'),
|
||||||
writeFile("dist/vencordDesktopMain.js", 'require("./vesktop.asar")')
|
writeFile("dist/vencordDesktopMain.js", 'require("./vesktop")')
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,7 +124,7 @@ try {
|
||||||
env: {
|
env: {
|
||||||
...process.env,
|
...process.env,
|
||||||
VENCORD_USER_DATA_DIR: BASE_DIR,
|
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"
|
VENCORD_DEV_INSTALL: "1"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
import { debounce } from "@shared/debounce";
|
import { debounce } from "@shared/debounce";
|
||||||
import { contextBridge, webFrame } from "electron";
|
import { contextBridge, webFrame } from "electron";
|
||||||
import { readFileSync, watch } from "fs";
|
import { readFileSync, watch } from "fs";
|
||||||
import { dirname, join } from "path";
|
import { join } from "path";
|
||||||
|
|
||||||
import VencordNative from "./VencordNative";
|
import VencordNative from "./VencordNative";
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ if (location.protocol !== "data:") {
|
||||||
if (IS_DEV) {
|
if (IS_DEV) {
|
||||||
// persistent means keep process running if watcher is the only thing still running
|
// persistent means keep process running if watcher is the only thing still running
|
||||||
// which we obviously don't want
|
// 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");
|
document.getElementById("vencord-css-core")!.textContent = readFileSync(rendererCss, "utf-8");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue