mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 17:37:14 +00:00
Update warning for Vuex store (classic mode)
This commit is contained in:
parent
eaee5afbde
commit
29d2751940
@ -50,7 +50,7 @@ function getModule (filename) {
|
|||||||
const file = files(filename)
|
const file = files(filename)
|
||||||
const module = file.default || file
|
const module = file.default || file
|
||||||
if (module.commit) {
|
if (module.commit) {
|
||||||
throw new Error('[nuxt] store/' + filename.replace('./', '') + ' should export a method which returns a Vuex instance.')
|
throw new Error('[nuxt] store/' + filename.replace('./', '') + ' should export a `createStore` method which returns a Vuex instance.')
|
||||||
}
|
}
|
||||||
if (module.state && typeof module.state !== 'function') {
|
if (module.state && typeof module.state !== 'function') {
|
||||||
throw new Error('[nuxt] state should be a function in store/' + filename.replace('./', ''))
|
throw new Error('[nuxt] state should be a function in store/' + filename.replace('./', ''))
|
||||||
|
Loading…
Reference in New Issue
Block a user