-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
const store = new Vuex.Store({ ... });
(Vue as any).store = store;
if (!_this.Vue.store) {
526: throw Error('[vue-auth-plugin] vuex is a required dependency if you want to use "vuex" as storage');
}
vue-auth-plugin.umd.js:526 Uncaught Error: [vue-auth-plugin] vuex is a required dependency if you want to use "vuex" as storage
at new StoreVuex (vue-auth-plugin.umd.js:526)
at vue-auth-plugin.umd.js:650
at Array.map (<anonymous>)
at AuthStoreManager.setStores (vue-auth-plugin.umd.js:640)
at new AuthStoreManager (vue-auth-plugin.umd.js:622)
at new Auth (vue-auth-plugin.umd.js:1833)
at Object.install (vue-auth-plugin.umd.js:1893)
at Function.Vue.use (vue.js:5094)
at vue-auth-plugin.umd.js:1910
at vue-auth-plugin.umd.js:9
- prevents using multiple
vue.jsapp instances:
https://vuex.vuejs.org/guide/state.html
when store is injected per-instance:
const app = new Vue({
el: '#app',
// provide the store using the "store" option.
// this will inject the store instance to all child components.
store,
components: { Counter },
template: `
<div class="app">
<counter></counter>
</div>
`
})
- instead,
VueAuthPluginshould behave as store-attached plugin:
https://vuex.vuejs.org/guide/plugins.html
const store = new Vuex.Store({
// ...
plugins: [VueAuthPlugin] // can be class or instance
})
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed