title: Vuex-persistedstate does not work after refreshing a page
body: <p>I am making a spa app with laravel and vue, and I would like to keep my login information in vuex's state after refreshing a page.</p>
  
  <p>I typed </p>
  
  <pre class="lang-sh prettyprint-override"><code>sudo npm install vuex-persistedstate
  </code></pre>
  
  <p>and installed  Vuex-persistedstate and set the plugins as below.</p>
  
  <pre class="lang-js prettyprint-override"><code>import Vue from 'vue' import Vuex from 'vuex'
  
  import auth from './auth'
  import createPersistedState from 'vuex-persistedstate'
  
  Vue.use(Vuex)
  
  const store = new Vuex.Store({
      modules: {
          auth,
          plugins: [createPersistedState()],
      }
  })
  
  export default store
  </code></pre>
  
  <p>I expected my data to be kept after refreshing a page but it was not.</p>
  
  <p>I checked what is going on, and it seems the plugin object was empty.</p>
  
  <p>it seems that I cannot import the plugins for some reason, but I do not know why.
  Could someone help me, please?</p>
  
  <p>my module file</p>
  
  <pre class="lang-js prettyprint-override"><code>const state = {
      user: null,
      salonId: null
  }
  
  const getters = {
      check: state =&gt; !! state.user,
      checkSalonId: state =&gt; {return state.salonId},
  }
  
  const mutations = {
      setUser (state, user) {
          state.user = user
      },
      setSalonId (state, salonId) {
          state.salonId = salonId
      }
  }
  
  const actions = {
      async currentUser (context) {
          const response = await axios.get('/api/user')
          const user = response.data || null
          context.commit('setUser', user)
      },
      async logout (context) {
          context.commit('setUser', null)
          context.commit('setSalonId', null)
      },
      async currentSalon (context, salonId) {
          context.commit('setSalonId', salonId)
      }
  }
  
  export default {
      namespaced: true,
      state,
      getters,
      mutations,
      actions,
  }
  </code></pre>