Home

Issue: 1155

Get store in an external js file.

[issue link]

I searched some informations about this and almost all store relative issues is about getting store in a plugin file. Please see my case here: I am importing an simple js file from assets folder and using some functions from it, but can I use store in that file ?

I am using 1.0.0-alpha5

Thanks for helping !

demo.vue

import Parser from '~assets/util/Parser.js'
Parser.parse(a, b, () => {
// ...
})

Parser.js

export default {
   parse (a, b) {
     // Need use store here  
   }
}
This question is available on Nuxt.js community (#c1016)