From 4b83f9380d4ad145c69516a870b3d37ea53ec99d Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 2 Jan 2020 11:28:29 +0100
Subject: [PATCH] Always import keycloak from the beginning

We always need it to check if th user is logged in already, so doing
a dynamic import doesn't give us anything and just slows things down.
---
 packages/auth/src/keycloak.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/packages/auth/src/keycloak.js b/packages/auth/src/keycloak.js
index 2d66567b..bc0b3cf9 100644
--- a/packages/auth/src/keycloak.js
+++ b/packages/auth/src/keycloak.js
@@ -1,4 +1,5 @@
 import {EventTarget} from "event-target-shim";  // Because EventTarget() doesn't exist on Safari
+import Keycloak from "keycloak-js";
 
 
 const promiseTimeout = function(ms, promise) {
@@ -72,8 +73,6 @@ export class KeycloakWrapper extends EventTarget {
         if (this._keycloak !== null)
             return;
 
-        const Keycloak = await import('keycloak-js').then((mod) => { return mod.default; });
-
         this._keycloak = Keycloak({
             url: this._baseURL,
             realm: this._realm,
-- 
GitLab