From 1eed589dbee82fe7ad29e062bf296dc1819cf2a5 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 15 Nov 2021 12:52:12 +0530 Subject: [PATCH] fix: load dependency dynamically Signed-off-by: Pranav C --- packages/nc-gui/plugins/localStorage.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/plugins/localStorage.js b/packages/nc-gui/plugins/localStorage.js index 2081289517..b206a9a78b 100644 --- a/packages/nc-gui/plugins/localStorage.js +++ b/packages/nc-gui/plugins/localStorage.js @@ -1,10 +1,5 @@ -import createPersistedState from 'vuex-persistedstate' - -import SecureLS from 'secure-ls' import isDev from '../helpers/xutils' -const ls = new SecureLS({ isCompression: false }) - export default async({ store, $vuetify: { theme }, route }) => { /** * @@ -39,6 +34,10 @@ export default async({ store, $vuetify: { theme }, route }) => { if (route && route.query && 'embed' in route.query) { window.rehydrated = true } else { + const createPersistedState = (await import('vuex-persistedstate')).default + const SecureLS = (await import('secure-ls')).default + const ls = new SecureLS({ isCompression: false }) + createPersistedState({ fetchBeforeUse: true, async rehydrated(store) {