main.js 749 B

123456789101112131415161718192021222324252627282930313233
  1. import Vue from 'vue'
  2. import BootstrapVue from 'bootstrap-vue'
  3. import Meta from 'vue-meta'
  4. import Vue2TouchEvents from 'vue2-touch-events'
  5. import router from './router'
  6. import store from './store'
  7. import App from './App'
  8. Vue.use(BootstrapVue, {
  9. BButton: { pill: true }
  10. })
  11. Vue.use(Meta)
  12. Vue.use(Vue2TouchEvents)
  13. // Register global components
  14. const requireComponent = require.context('@/components/globals', true, /\.(js|vue)$/i)
  15. // For each matching file name...
  16. requireComponent.keys().forEach((fileName) => {
  17. // Get the component
  18. const component = requireComponent(fileName).default
  19. // Globally register the component
  20. Vue.component(component.name, component)
  21. })
  22. new Vue({
  23. router,
  24. store,
  25. render: h => h(App)
  26. }).$mount('#app')