Skip to content

"Symbol() not found" when shipping library #856

Discussion options

You must be logged in to vote

I personally suggest using inject/provide for libraries if you need to pass around state. It's lighter and should cover most of the cases. (I didn't get you were talking about a library and not an Application)

If you still think a store will help you, you need to add pinia as a peer dependency of the project, make sure it is marked as an external lib when bundling your lib (you can check this by verifying your lib has imports from pinia in its code), and let the user call app.use(pinia) themselves.

Calling setActivePinia() works for testing stores, not for apps because it will skip any plugins and that's why there is createTestingPinia().

It's also important to note that having multiple p…

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@posva
Comment options

@bcakmakoglu
Comment options

@bcakmakoglu
Comment options

Comment options

You must be logged in to vote
2 replies
@posva
Comment options

posva Dec 1, 2021
Maintainer

@bcakmakoglu
Comment options

Comment options

You must be logged in to vote
5 replies
@bcakmakoglu
Comment options

@bcakmakoglu
Comment options

@posva
Comment options

posva Dec 1, 2021
Maintainer

@AmareshKulkarni
Comment options

@krckyboy
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants