I just want to confirm my understanding of Vuex store module registration.
My understanding is that
const store = {
modules: {
mod1,
mod2,
mod3,
...
}
}
export default store
registers the module during transpile time, when .vue and other webpack stuff is happening, whereas
store.registerModule('mod1', mod1)
store.registerModule('mod2', mod2)
store.registerModule('mod3', mod3)
happens at runtime when the code actually gets to the client, making the frontend ever so slightly slower.
Am I correct in my understanding?
registerModule()gives plugin integration as an example usage, but plugins are part of the compile - so not really 'runtime' in that scenario. - Richard Matsen