nuxt-spa-store-initA simple Nuxt module that will hydrate the VueX store when running in SPA mode, whether this is because you are running
yarn dev --spaor you're using the fallback option of
yarn generate. It is based on this comment as well as this comment and calls the root Vuex action
nuxtServerInit()if it hasn't run yet.
yarn add nuxt-spa-store-initor
npm install --save nuxt-spa-store-init
- Add to
store/index.jsreturns a Promise. Other than that, it just works automatically.