Stores don't show up in nuxt devtools 3.16 #2952
Replies: 6 comments 9 replies
-
For clarification: I don't have any browser extensions installed and have tried this in multiple browsers all with the same result |
Beta Was this translation helpful? Give feedback.
-
It works fine on my end: It could be something specific in your setup? Moving to a discussion. |
Beta Was this translation helpful? Give feedback.
-
I fixed it by changing this: import { createPinia, setActivePinia } from 'pinia'
import type { Pinia } from 'pinia'
import { defineNuxtPlugin, type Plugin } from '#app'
import { toRaw } from 'vue'
const plugin: Plugin<{ pinia: Pinia }> = defineNuxtPlugin({
name: 'pinia',
dependsOn: ['nuxt:checkIfLayoutUsed']. // Added this
setup(nuxtApp) {
const pinia = createPinia()
nuxtApp.vueApp.use(pinia)
setActivePinia(pinia)
if (import.meta.server) {
nuxtApp.payload.pinia = toRaw(pinia.state.value)
} else if (nuxtApp.payload && nuxtApp.payload.pinia) {
pinia.state.value = nuxtApp.payload.pinia as any
}
// Inject $pinia
return {
provide: {
pinia,
},
}
},
})
export default plugin There is a plugin without name that is called right after |
Beta Was this translation helpful? Give feedback.
-
Reproduction
https://stackblitz.com/edit/nuxt-pinia-issue-3-16
Steps to reproduce the bug
Expected behavior
I expect the stores to show up just like in version 3.15
Actual behavior
The stores don't show up and instead just show an empty tab
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions