14nrv/buefy-shop

View on GitHub
plugins/localStorage.js

Summary

Maintainability
A
0 mins
Test Coverage
import createPersistedState from 'vuex-persistedstate'

export default ({ store, isHMR }) => {
  if (isHMR) return

  process.client && window.onNuxtReady((nuxt) => {
    createPersistedState({
      paths: ['cart']
    })(store)
  })
}