File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,26 @@ require('./bootstrap');
9
9
10
10
window . Vue = require ( 'vue' ) ;
11
11
12
+ /**
13
+ * The following block of code may be used to automatically register your
14
+ * Vue components. It will recursively scan this directory for the Vue
15
+ * components and automatically register them with their "basename".
16
+ *
17
+ * Eg. ./components/CreateUser.vue -> <create-user></create-user>
18
+ */
19
+
20
+ // const files = require.context('./', true, /\.vue$/i)
21
+
22
+ // files.keys().map(key => {
23
+ // return Vue.component(_.last(key.split('/')).split('.')[0], files(key))
24
+ // })
25
+
12
26
/**
13
27
* Next, we will create a fresh Vue application instance and attach it to
14
28
* the page. Then, you may begin adding components to this application
15
29
* or customize the JavaScript scaffolding to fit your unique needs.
16
30
*/
17
31
18
- const files = require . context ( './' , true , / \. v u e $ / i)
19
- files . keys ( ) . map ( key => {
20
- const name = _ . last ( key . split ( '/' ) ) . split ( '.' ) [ 0 ]
21
- return Vue . component ( name , files ( key ) )
22
- } )
23
-
24
32
const app = new Vue ( {
25
33
el : '#app'
26
34
} ) ;
You can’t perform that action at this time.
0 commit comments