app.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * First we will load all of this project's JavaScript dependencies which
  3. * includes Vue and other libraries. It is a great starting point when
  4. * building robust, powerful web applications using Vue and Laravel.
  5. */
  6. require('./bootstrap');
  7. window.Vue = require('vue');
  8. /**
  9. * The following block of code may be used to automatically register your
  10. * Vue components. It will recursively scan this directory for the Vue
  11. * components and automatically register them with their "basename".
  12. *
  13. * Eg. ./components/ExampleComponent.vue -> <example-component></example-component>
  14. */
  15. Vue.component('example-component', require('./components/ExampleComponent.vue'));
  16. // const files = require.context('./', true, /\.vue$/i)
  17. // files.keys().map(key => {
  18. // return Vue.component(_.last(key.split('/')).split('.')[0], files(key))
  19. // })
  20. /**
  21. * Next, we will create a fresh Vue application instance and attach it to
  22. * the page. Then, you may begin adding components to this application
  23. * or customize the JavaScript scaffolding to fit your unique needs.
  24. */
  25. const app = new Vue({
  26. el: '#app'
  27. });