pina and vue-router 4 seems not work on a single file #951
Unanswered
Seyid-cmd
asked this question in
Help and Questions
Replies: 1 comment
-
This is related to Vue Router and is expected: you can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If i use
router will work but pinia is not with error
//here is axiosroot.ts
When i import router from vue-router
useRouter is undefined
the error
// here is the remainning relavant code
export const useAuthStore = defineStore({
id: "user",
state: () => ({
token: localStorage.getItem('token'),
logInStatus:!!localStorage.getItem('token')
}),
actions: {
},
});
if (import.meta.hot) {
import.meta.hot.accept(acceptHMRUpdate(useAuthStore, import.meta.hot));
}
Beta Was this translation helpful? Give feedback.
All reactions