Browse Source

fix: load dependency dynamically

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/765/head
Pranav C 3 years ago
parent
commit
1eed589dbe
  1. 9
      packages/nc-gui/plugins/localStorage.js

9
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) {

Loading…
Cancel
Save