Add strict mode in development mode by default

This commit is contained in:
Sébastien Chopin 2017-08-13 22:19:37 +02:00
parent eabaab1ad9
commit d9796be0bb

View File

@ -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() : {}
})) }))
} }