vuex-ts-decorators
vuex-ts-decorators copied to clipboard
[vuex] must call Vue.use(Vuex) before creating a store instance
This one's weird :/
vuex.esm.js:96 Uncaught Error: [vuex] must call Vue.use(Vuex) before creating a store instance.
at assert (vuex.esm.js:96)
at new Store (vuex.esm.js:243)
at Object.Event.initEvent.cancelable.type (module.ts:6)
at __webpack_require__ (bootstrap d48f772…:19)
at Object.<anonymous> (action.ts:28)
at __webpack_require__ (bootstrap d48f772…:19)
at Object.exports.byteLength (chart.ts:21)
at __webpack_require__ (bootstrap d48f772…:19)
at Object.<anonymous> (net.busy.ts:13)
at __webpack_require__ (bootstrap d48f772…:19)
It's coming from module.ts:6
but it clearly does call Vue.use(Vuex);
before that.
Thanks @roblav96! I'm currently in the middle of a slight refactor that will change things a bit (for the better) will keep you posted.
@snaptopixel Awesome! I'm very excited to see more out of this. Thanks mate!
Is this related at all to how the imports are done?
With latest Vue changes we're now supposed to import in TS like so:
import Vue from 'vue';
import Vuex from 'vuex';
@hworld Yes you are correct. You can no longer do import * as Vue from 'vue'
Thanks @roblav96 I'm close to finished with the refactor and will be releasing as a new project soon. I will keep you posted!