Static GitHub Issues

[1044] Dynamic vuex modules and the fetch() method

prev: Head function called twice in nuxt-child components
next: How to use a plugin inside my store ?

What I want to do is to dynamically register a vuex module and call its action from within the fetch method. I tried to register my module in a separate file in the plugins directory and then add it to the config. It didn't work at all, the store ignored my module completely (I imported the store in that file manually, perhaps that was the problem). I also tried to do it in the beforeCreate hook of my index component, using the this.$store reference. This time it was registered successfully, but too late, since it wasn't available during the fetch call. Any ideas how to do it right?

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c913">#c913</a>)</em></sub></div>