mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 09:22:27 +00:00
Add strict mode in development mode by default
This commit is contained in:
parent
eabaab1ad9
commit
d9796be0bb
@ -45,7 +45,9 @@ if (typeof storeData !== 'function') {
|
|||||||
|
|
||||||
// createStore
|
// createStore
|
||||||
export const createStore = storeData instanceof Function ? storeData : () => {
|
export const createStore = storeData instanceof Function ? storeData : () => {
|
||||||
return new Vuex.Store(Object.assign({}, storeData, {
|
return new Vuex.Store(Object.assign({
|
||||||
|
strict: (process.env.NODE_ENV !== 'production'),
|
||||||
|
}, storeData, {
|
||||||
state: storeData.state instanceof Function ? storeData.state() : {}
|
state: storeData.state instanceof Function ? storeData.state() : {}
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user