mirror of https://github.com/rancher/dashboard.git
11 lines
350 B
JavaScript
11 lines
350 B
JavaScript
import Vue from 'vue';
|
|
|
|
const components = require.context('@/components/formatter', false, /[A-Z]\w+\.(vue)$/);
|
|
|
|
components.keys().forEach((fileName) => {
|
|
const componentConfig = components(fileName);
|
|
const componentName = fileName.split('/').pop().split('.')[0];
|
|
|
|
Vue.component(componentName, componentConfig.default || componentConfig);
|
|
});
|