HappyJayXin
11/29/2019 - 4:35 AM

Set global component.

Set global component.

import Vue from "vue";

const components = [
  import("~/components/Prototype/TitleH3"),
  import("~/components/Prototype/TitleH2")
];

Promise.all(components).then(values => {
  values.forEach(component => {
    Vue.component(component.default.name, component.default);
  });
});