This is the library: https://github.com/robinvdvleuten/vuex-persistedstate. I created the following plugin file for Nuxt.
import createPersistedState from 'vuex-persistedstate'
export default ({ store }) => {
createPersistedState()(store)
}
The problem is I am not sure how I can exlude certain stores since this persists all the stores.
The repo you're sharing is archived as of today so you should probably pass on it and switch to Pinia.
There are 2 packages doing that with Pinia:
Otherwise, a homemade solution may be needed but vuex-persistedstate will not allow you to select a store as you initially wanted.