Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to see Pinia option in Vue DevTools Standalone app. #723

Open
shriramkure opened this issue Dec 4, 2024 · 3 comments
Open

Unable to see Pinia option in Vue DevTools Standalone app. #723

shriramkure opened this issue Dec 4, 2024 · 3 comments
Labels
need reproduction Reproduction is needed

Comments

@shriramkure
Copy link

Hi,

I am using Vue DEV Tools standalone app. I have added vue-devtools as a dependency in my package.json & connect to devtools before app initialization. Vue Dev Tools shows all the components but it does not show Pinia to Debug State Management. Any help in this regard is highly appreciated.

image

@kevinluo201
Copy link
Contributor

I don't know whether it's related. We have a multi-app application. The Pinia option only shows up when I switch to the second app in the devtool. It never shows up for the first app

@webfansplz webfansplz added the need reproduction Reproduction is needed label Mar 29, 2025
@webfansplz
Copy link
Member

Can you provide a mini repo? Thanks 🙏.

@kevinluo201
Copy link
Contributor

kevinluo201 commented Mar 31, 2025

After testing on multi-app/, I think it's just a misunderstanding. I think the Pinia icon only shows up when the app explicitly calls app.use(pinia)

import { createApp } from 'vue'

import App2 from './App2.vue'
import App from './App.vue'
import { createPinia } from 'pinia'

const pinia = createPinia()
const app = createApp(App)
app.use(pinia)
app.mount('#app')

const app2 = createApp(App2) // <== app2 doesn't call use(pinia) so the pinia icon doesn't show up
app2.mount('#app2')

It will result in this:
https://github.com/user-attachments/assets/2d0365be-d92f-430c-80ce-6e70ce0467ea
App2 accesses the store but it doesn't have the Pinia button on the devtool

Nonetheless, it can be a design decision. Since the Pinia stores are shared among all apps. I think the devtool can show the pinia icon when as long as there is one app calls use(pinia)

I had a problem of this issue because the company I work for is adding Vue.js into the existing Backbone.js app. We "inject" Vue components into the existing app, which create a new app everytime. We can have tens to more than one hundred apps exist at the same time. Not every app calls .use(pinia) (I don't know if it's intentional or not...) so I need to switch apps many times to find one having the Pinia button

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need reproduction Reproduction is needed
Projects
None yet
Development

No branches or pull requests

3 participants