From 6ce7bf845869a6d010265894b02c07f0cb22d818 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 6 Oct 2021 23:34:26 -0400 Subject: [PATCH] Skip loading config for multiserver when served by webpack Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/scripts/settings/webSettings.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/scripts/settings/webSettings.js b/src/scripts/settings/webSettings.js index 2eb1bcbd4f..517b7fe0e2 100644 --- a/src/scripts/settings/webSettings.js +++ b/src/scripts/settings/webSettings.js @@ -71,11 +71,12 @@ export function getIncludeCorsCredentials() { } export function getMultiServer() { + // Enable multi-server support when served by webpack + if (__WEBPACK_SERVE__) { // eslint-disable-line no-undef + return Promise.resolve(true); + } + return getConfig().then(config => { - // Enable multi-server support when served by webpack - if (__WEBPACK_SERVE__) { // eslint-disable-line no-undef - return true; - } return !!config.multiserver; }).catch(error => { console.log('cannot get web config:', error);