You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I setting up pinia with Vue3 application in the following way:
import { createApp } from "vue";
import { createPinia } from 'pinia';
import Page from "./components/Page.vue";
const app = createApp(Page);
const pinia = createPinia();
app.use(pinia);
app.mount("#app");
My stores are properly detected by Vue devtools, as shown in following screen:
But when I move pinia part to separate plugin file:
// piniaPlugin.js
import { createPinia } from 'pinia';
const pinia = createPinia();
export default pinia;
//app.js
import { createApp } from "vue";
import piniaPlugin from './piniaPlugin';
import Page from "./components/Page.vue";
const app = createApp(Page);
app.use(piniaPlugin);
app.mount("#app");
My stores are not detected as "installed" (I don't see those lines in console) and there are no changes recorded for them in "Timeline" section.
(Pinia plugin itself is detected properly by Vue devtools and I can see my stores content there, only Timeline part is not working)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I setting up pinia with Vue3 application in the following way:
My stores are properly detected by Vue devtools, as shown in following screen:
But when I move pinia part to separate plugin file:
My stores are not detected as "installed" (I don't see those lines in console) and there are no changes recorded for them in "Timeline" section.
(Pinia plugin itself is detected properly by Vue devtools and I can see my stores content there, only Timeline part is not working)
What I'm doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions