Skip to content

purwnt/vue-load-vuex-module-dynamically

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue Load Vuex Module Dynamically

Dynamically import vuex module in your Vue.js application

JavaScript Style Guide GitHub license

This vuex store saves you (and others!) time in two ways:

  • No configuration. The easiest way to enforce consistent style in your vue project. Just drop it in.
  • Automatically load module. Just create your module in store/modules folder and say goodbye to import vuex module one by one.

How To Use It

Clone this repository

git clone https://github.com/purwnt/vue-load-vuex-module-dynamically.git

Move store folder to your src Vue.js application project

cd vue-load-vuex-module-dynamically
mv store YOUR_VUE_PROJECT/src/

Import store in your main.js file and use it.

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

About

Dynamically import vuex module in your Vue.js application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published