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

Add vuex configuration #53

Closed
jamesgeorge007 opened this issue Oct 14, 2018 · 0 comments
Closed

Add vuex configuration #53

jamesgeorge007 opened this issue Oct 14, 2018 · 0 comments
Labels
bug Something isn't working

Comments

@jamesgeorge007
Copy link
Member

jamesgeorge007 commented Oct 14, 2018

The vuex package can be added via the add:package command. It creates a store.js file with the initial boilerplate within client/src directory.

The new store.js file has to be imported and passed on to the Vue instance. Importing store file is already done which still is not that perfect. If the same command is being repeatedly executed, content repeats (import store from './store') within the main.js file which has to be handled. Also, the store being imported has to be passed in as an arguement within the Vue instance.
This is a typical main.js file:-

import store from ./store;
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant