app.js 1.1 KB

123456789101112131415161718192021222324252627282930313233
  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. // const files = require.context('./', true, /\.vue$/i)
  16. // files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default))
  17. Vue.component('example-component', require('./components/ExampleComponent.vue').default);
  18. /**
  19. * Next, we will create a fresh Vue application instance and attach it to
  20. * the page. Then, you may begin adding components to this application
  21. * or customize the JavaScript scaffolding to fit your unique needs.
  22. */
  23. const app = new Vue({
  24. el: '#app'
  25. });