1
0

index.js 461 B

12345678910111213141516171819202122232425262728
  1. import Vue from 'vue'
  2. import Vuex from '../../../src'
  3. import actions from './actions'
  4. import mutations from './mutations'
  5. import getters from './getters'
  6. Vue.use(Vuex)
  7. const state = {
  8. count: 0,
  9. history: []
  10. }
  11. const store = new Vuex.Store({
  12. state,
  13. mutations
  14. })
  15. if (module.hot) {
  16. module.hot.accept(['./mutations'], () => {
  17. const mutations = require('./mutations').default
  18. store.hotUpdate({
  19. mutations
  20. })
  21. })
  22. }
  23. export default store