feat: add hot reloading support
This commit is contained in:
parent
f7ca064127
commit
1c58fccd92
2 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { defineStore } from 'pinia'
|
import { acceptHMRUpdate, defineStore } from 'pinia'
|
||||||
|
|
||||||
import LabelService from '@/services/label'
|
import LabelService from '@/services/label'
|
||||||
import {success} from '@/message'
|
import {success} from '@/message'
|
||||||
|
@ -134,3 +134,8 @@ export const useLabelStore = defineStore('label', {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// support hot reloading
|
||||||
|
if (import.meta.hot) {
|
||||||
|
import.meta.hot.accept(acceptHMRUpdate(useLabelStore, import.meta.hot))
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
import {watch, reactive, shallowReactive, unref, toRefs, readonly} from 'vue'
|
import {watch, reactive, shallowReactive, unref, toRefs, readonly} from 'vue'
|
||||||
import {defineStore} from 'pinia'
|
import {acceptHMRUpdate, defineStore} from 'pinia'
|
||||||
import {useI18n} from 'vue-i18n'
|
import {useI18n} from 'vue-i18n'
|
||||||
|
|
||||||
import ListService from '@/services/list'
|
import ListService from '@/services/list'
|
||||||
|
@ -180,3 +180,8 @@ export function useList(listId: MaybeRef<IList['id']>) {
|
||||||
save,
|
save,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// support hot reloading
|
||||||
|
if (import.meta.hot) {
|
||||||
|
import.meta.hot.accept(acceptHMRUpdate(useListStore, import.meta.hot))
|
||||||
|
}
|
Loading…
Reference in a new issue