Skip to content

Instantly share code, notes, and snippets.

@afontcu
Last active September 16, 2017 13:59
Show Gist options
  • Save afontcu/5414afba256895da9c9affb3b26b4966 to your computer and use it in GitHub Desktop.
Save afontcu/5414afba256895da9c9affb3b26b4966 to your computer and use it in GitHub Desktop.
import createPersistedState from 'vuex-persistedstate'
const store = new Vuex.Store({
strict: process.env.NODE_ENV !== 'production',
actions,
getters,
mutations,
modules,
plugins: [
createPersistedState({
storage: window.sessionStorage,
key: config.SESSION_NAME,
paths: ['user', 'categories', 'upgrades', 'experiences', 'cart']
})
]
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment