app.js 723 B

1234567891011121314151617181920212223242526
  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. * Next, we will create a fresh Vue application instance and attach it to
  10. * the page. Then, you may begin adding components to this application
  11. * or customize the JavaScript scaffolding to fit your unique needs.
  12. */
  13. const files = require.context('./', true, /\.vue$/i)
  14. files.keys().map(key => {
  15. const name = _.last(key.split('/')).split('.')[0]
  16. return Vue.component(name, files(key))
  17. })
  18. const app = new Vue({
  19. el: '#app'
  20. });