#Sharing store created with @stencil/store

1 messages · Page 1 of 1 (latest)

dusty tulip
#

We're having trouble sharing a stencil store across stencil packages. We have a monorepo setup with an ember application consuming several different stencil packagaes. Importing and then reading/updating the stencil store from within the ember context works just fine. However, when importing the store in a separate stencil package which consumes the original stencil package exposing the store, we end up with a different reference to the store which does not reflect the state in ember's reference or the one in the stencil package exposing the store. This seems like a bundling problem, but we're unsure how to proceed.

bitter raft
#

So the issue isn't ember-specific? You only see this problem when you're trying to use a Stencil store between 2 stencil projects?

undone cedar
#

Hi Erik, I'm working with Alex on this. That's correct, we are not able to get a reference that points to the same store object in both stencil packages.

bitter raft
#

Interesting. I don't have much experience with Stencil Stores, but I imagine the source code of a Store needs to be compiled by the Stencil Compiler first before being usable, is that correct?