Skip to content

Commit 500df40

Browse files
fix(base): remove wrapper function from base app plugin.
1 parent d64fc90 commit 500df40

File tree

1 file changed

+12
-13
lines changed
  • packages/@vuetify/presets/generator/templates/base/src/plugins

1 file changed

+12
-13
lines changed

packages/@vuetify/presets/generator/templates/base/src/plugins/app.js

+12-13
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
* in the `./src/components/` folder.
66
*/
77

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, /\.vue$/)
8+
import Vue from 'vue'
149

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, /\.vue$/)
15+
for (const file of requireComponent.keys()) {
16+
const componentConfig = requireComponent(file)
1717

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+
)
2322
}

0 commit comments

Comments
 (0)