Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vuex not added to Vue instance because blessed-vue version is less than 2.x #7

Closed
geiseri opened this issue Jan 21, 2018 · 2 comments
Closed

Comments

@geiseri
Copy link
Contributor

geiseri commented Jan 21, 2018

Consider the following code:

import Vue from 'blessed-vue';
import LogComponent from './log.vue';
import store from './store';

const el = Vue.dom.createElement();

Vue.dom.append(el);

const instance = new Vue({
  name: 'app',
  components: {
    LogComponent
  },
  store,
  template: '<LogComponent />'
}).$mount(el);

The value store should be added to the vm as $store to be globally available . For some reason this doesn't function properly so things like vuex are not possible to use.

@geiseri
Copy link
Contributor Author

geiseri commented Jan 23, 2018

Actually it looks like this might be an issue with the Vuex plugin. It checks to see if the version of Vue is greater than or equal to 2. For some reason blessed is returning 1. Where might that version number come from?

@geiseri
Copy link
Contributor Author

geiseri commented Jan 23, 2018

Found it. It looks like it gets it from the package.json. If you change the version to 2.something and rebuild then it works. Can you just change the version to 2.0?

@geiseri geiseri changed the title Globals not added to Vue instance Vuex not added to Vue instance because blessed-vue version is less than 2.x Jan 23, 2018
geiseri added a commit to geiseri/blessed-vue that referenced this issue Jan 23, 2018
1. Update to latest VueJS.
2. Update to latest rollup.
3. Update to latest blessed-vue.
4. Fix issue with missing weex dependency.
5. Removed bundleSize because it was causing build errors.
6. Update version to 2.0.0 so that Vuex will load correctly.

All tests pass.
lyonlai added a commit that referenced this issue Jan 28, 2018
Update to latest VueJS and a fix for issue #7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant