diff --git a/src/bootstrap.js b/src/bootstrap.js index 1d392ea..11ada9c 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -20,8 +20,6 @@ switch (process.platform) { // Discord forces these app.name = 'discord'; // Force name as sometimes breaks app.allowRendererProcessReuse = false; -const requireNative = require('./utils/requireNative'); - const paths = require('./paths'); global.moduleDataPath = paths.getModuleDataPath(); // Global because discord app.setPath('userData', paths.getUserData()); // Set userData properly because electron @@ -51,7 +49,7 @@ if (!settings.get('enableHardwareAcceleration', true)) app.disableHardwareAccele let desktopCore; const startCore = () => { - desktopCore = requireNative('discord_desktop_core'); + desktopCore = require('discord_desktop_core'); log('Bootstrap', 'Required desktop_core:', desktopCore); desktopCore.startup({ diff --git a/src/index.js b/src/index.js index da72445..2cf443a 100644 --- a/src/index.js +++ b/src/index.js @@ -31,7 +31,7 @@ if (process.argv.includes('--overlay-host')) { require('./updater/moduleUpdater').initPathsOnly(buildInfo); } - require('./utils/requireNative')('discord_overlay2/standalone_host.js') + require('discord_overlay2/standalone_host.js') } else { const bootstrap = require('./bootstrap'); diff --git a/src/utils/requireNative.js b/src/utils/requireNative.js deleted file mode 100644 index a0ecc86..0000000 --- a/src/utils/requireNative.js +++ /dev/null @@ -1,3 +0,0 @@ -// From Discord to only require native modules like discord_desktop_core -module.paths = []; -module.exports = require; \ No newline at end of file