Home

Issue: 863

get vuex store without a context or a vue component

[issue link]

How I can get the store in javascript modules that doesn’t have access to the nuxt context or a vue component?

import Store from '~store'
// or
const store = require('~store')

console.log(store)
// { createStore: [Getter] }

is not working any more in the latest versions.

This question is available on Nuxt.js community (#c736)