From 5dcfef2820ac9133491bf7f3dd12853a5eb6555e Mon Sep 17 00:00:00 2001 From: filip mertens Date: Thu, 22 Jun 2023 13:45:36 +0200 Subject: [PATCH] required modules --- apps/remix-ide/src/remixAppManager.js | 7 ++++++- apps/remixdesktop/src/main.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/remixAppManager.js b/apps/remix-ide/src/remixAppManager.js index 9c9f365f23..c51f2e8108 100644 --- a/apps/remix-ide/src/remixAppManager.js +++ b/apps/remix-ide/src/remixAppManager.js @@ -5,7 +5,7 @@ import { IframePlugin } from '@remixproject/engine-web' const _paq = window._paq = window._paq || [] // requiredModule removes the plugin from the plugin manager list on UI -const requiredModules = [ // services + layout views + system views +let requiredModules = [ // services + layout views + system views 'manager', 'config', 'compilerArtefacts', 'compilerMetadata', 'contextualListener', 'editor', 'offsetToLineColumnConverter', 'network', 'theme', 'locale', 'fileManager', 'contentImport', 'blockchain', 'web3Provider', 'scriptRunner', 'fetchAndCompile', 'mainPanel', 'hiddenPanel', 'sidePanel', 'menuicons', 'filePanel', 'terminal', 'settings', 'pluginManager', 'tabs', 'udapp', 'dGitProvider', 'solidity', 'solidity-logic', 'gistHandler', 'layout', @@ -14,6 +14,11 @@ const requiredModules = [ // services + layout views + system views 'vm-shanghai', 'compileAndRun', 'search', 'recorder', 'fileDecorator', 'codeParser', 'codeFormatter', 'solidityumlgen', 'contractflattener', 'solidity-script'] +if(isElectron()) { + requiredModules = [...requiredModules, 'fs', 'electronTemplates', 'isogit', 'remix-templates', 'electronconfig'] +} + + // dependentModules shouldn't be manually activated (e.g hardhat is activated by remixd) const dependentModules = ['foundry', 'hardhat', 'truffle', 'slither'] diff --git a/apps/remixdesktop/src/main.ts b/apps/remixdesktop/src/main.ts index 11356628e3..1fd5cb37fe 100644 --- a/apps/remixdesktop/src/main.ts +++ b/apps/remixdesktop/src/main.ts @@ -26,7 +26,7 @@ export const createWindow = async (dir?: string): Promise => { preload: path.join(__dirname, 'preload.js') }, }); - + if(dir && dir.endsWith('/')) dir = dir.slice(0, -1) let params = dir ? `?opendir=${encodeURIComponent(dir)}` : ''; // and load the index.html of the app. mainWindow.loadURL(