i am using in vite+vue app and this is my code
import { createStore } from "vuex";
import VuexPersistence from "vuex-persist";
// import createPersistedState from "vuex-persistedstate";
// import Cookies from "js-cookie";
import state from "./state.js";
import as actions from "./actions.js";
import as mutations from "./mutations.js";
import * as getters from "./getters.js";
const vuexLocal = new VuexPersistence({
storage: window.localStorage,
});
i am using in vite+vue app and this is my code import { createStore } from "vuex"; import VuexPersistence from "vuex-persist"; // import createPersistedState from "vuex-persistedstate"; // import Cookies from "js-cookie"; import state from "./state.js"; import as actions from "./actions.js"; import as mutations from "./mutations.js"; import * as getters from "./getters.js"; const vuexLocal = new VuexPersistence({ storage: window.localStorage, });
const store = createStore({ state, actions, mutations, getters, plugins: [new VuexPersistence().plugin], });
export default store;