I made Vue app which I build with vue-cli-service
as a library.
"bundle": "vue-cli-service build --target lib --name search_widget \"src/components/index.js\""
It's building umd.js files which then I can release to npm and require in my other Vue apps.
In the library I have the following component:
<template>
<div>hello {{ $store.state }}</div>
</template>
<script>
export default {
name: "HelloWorld"
};
</script>
My issue is that when I require this library to other vue(nuxt) app I can see this nuxt app store not the library store. This is not good for me because I would need to have same actions/mutations/state across every app where I require library.
Is there some option to make the library store "packed" with library when building so the library will use its own store, not the store where it's required to?