diff --git a/src/main/index.ts b/src/main/index.ts index acbb2dc45..8479570e1 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -7,7 +7,8 @@ import { getSetting } from "./ipc/settings"; const electronPath = require.resolve("electron"); const discordPath = join(dirname(require.main!.filename), "..", "app.orig.asar"); -// require.main!.filename = discordMain; +const discordPackage = require(join(discordPath, "package.json")); +require.main!.filename = join(discordPath, discordPackage.main); Object.defineProperty(global, "appSettings", { set: (v /* : typeof global.appSettings*/) => { @@ -185,4 +186,4 @@ electron.app.once("ready", () => { // This module is required this way at runtime. require("./ipc"); -require("module")._load(discordPath); +require(discordPath);