1234567891011121314151617181920212223242526 |
- import Vue from 'vue'
- import Vuex from '../../../src'
- import mutations from './mutations'
- Vue.use(Vuex)
- const state = {
- count: 0,
- history: []
- }
- const store = new Vuex.Store({
- state,
- mutations
- })
- if (module.hot) {
- module.hot.accept(['./mutations'], () => {
- const mutations = require('./mutations').default
- store.hotUpdate({
- mutations
- })
- })
- }
- export default store
|