File tree 1 file changed +12
-13
lines changed
packages/@vuetify/presets/generator/templates/base/src/plugins
1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change 5
5
* in the `./src/components/` folder.
6
6
*/
7
7
8
- export function registerComponents ( app ) {
9
- // Automatically get all .vue files within
10
- // `src/components` and register them to
11
- // the current app.
12
- // https://webpack.js.org/guides/dependency-management/#requirecontext
13
- const requireComponent = require . context ( '@/components' , true , / \. v u e $ / )
8
+ import Vue from 'vue'
14
9
15
- for ( const file of requireComponent . keys ( ) ) {
16
- const componentConfig = requireComponent ( file )
10
+ // Automatically get all .vue files within
11
+ // `src/components` and register them to
12
+ // the current app.
13
+ // https://webpack.js.org/guides/dependency-management/#requirecontext
14
+ const requireComponent = require . context ( '@/components' , true , / \. v u e $ / )
15
+ for ( const file of requireComponent . keys ( ) ) {
16
+ const componentConfig = requireComponent ( file )
17
17
18
- app . component (
19
- componentConfig . default . name ,
20
- componentConfig . default || componentConfig ,
21
- )
22
- }
18
+ Vue . component (
19
+ componentConfig . default . name ,
20
+ componentConfig . default || componentConfig ,
21
+ )
23
22
}
You can’t perform that action at this time.
0 commit comments