From ed7d71934a8553474e3d9df7d2136c000ee0e48c Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 16 May 2024 13:57:25 +0530 Subject: [PATCH] SDA-4544 - only load dev tool extension on dev env (#2150) --- src/app/main.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/main.ts b/src/app/main.ts index 3b4b7834..8726b524 100644 --- a/src/app/main.ts +++ b/src/app/main.ts @@ -15,7 +15,6 @@ import { ICustomBrowserWindow, windowHandler } from './window-handler'; import { autoLaunchInstance } from './auto-launch-controller'; import { autoUpdate } from './auto-update-handler'; -import { loadReactDevToolsExtension } from './extension-handler'; import { presenceStatusStore } from './stores'; // Set automatic period substitution to false because of a bug in draft js on the client app @@ -113,7 +112,10 @@ const startApplication = async () => { await windowHandler.createApplication(); logger.info(`main: created application`); - await loadReactDevToolsExtension(logger); + if (isDevEnv) { + const { loadReactDevToolsExtension } = require('./extension-handler'); + await loadReactDevToolsExtension(logger); + } }; // Handle multiple/single instances