vuex-persistedstate

This commit is contained in:
rca 2024-07-19 01:30:18 +09:00
parent 2aef4f4f24
commit bc3999f440

View File

@ -1,6 +1,7 @@
import { createStore } from 'vuex'
import accountStateModule from './account';
import { AccountStateInterface } from './account/state';
import createPersistedState from 'vuex-persistedstate';
export interface RootStateInterface {
// Define your own store structure, using submodules if needed
@ -12,6 +13,7 @@ export default function (/* { ssrContext } */) {
modules: {
account: accountStateModule
},
plugins: [createPersistedState({storage: window.sessionStorage})],
// enable strict mode (adds overhead!)
// for dev mode and --debug builds only