feat(vue-app): Add deprecating for classic mode and handle mutations/actions HMR to store/index.js

This commit is contained in:
Sébastien Chopin 2018-12-19 17:15:01 +01:00
parent b2eee1772e
commit c8b920a145

View File

@ -79,10 +79,14 @@ void function updateModules() {
// Update `root.modules` with the latest definitions.
updateModules()
// Trigger a hot update in the store.
window.<%= globals.nuxt %>.$store.hotUpdate({ modules: storeData.modules })
window.<%= globals.nuxt %>.$store.hotUpdate(storeData)
})
}<% } %>
}
else {
const log = (process.server ? require('consola') : console)
log.warn('Classic mode for store/ is deprecated and will be removed in Nuxt 3.')
}
}()
// createStore